Skip to content

Commit e43aead

Browse files
committed
[3.11] pythongh-84461: Fix test_sqlite for Emscripten/WASI (pythonGH-94125).
(cherry picked from commit 15bfabd) Co-authored-by: Christian Heimes <christian@python.org>
1 parent 00a25f8 commit e43aead

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Lib/test/test_sqlite3/test_dbapi.py

+8-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,10 @@
2929
import unittest
3030
import urllib.parse
3131

32-
from test.support import SHORT_TIMEOUT, bigmemtest, check_disallow_instantiation
32+
from test.support import (
33+
SHORT_TIMEOUT, bigmemtest, check_disallow_instantiation, requires_subprocess,
34+
is_emscripten, is_wasi
35+
)
3336
from test.support import threading_helper
3437
from _testcapi import INT_MAX, ULLONG_MAX
3538
from os import SEEK_SET, SEEK_CUR, SEEK_END
@@ -658,6 +661,7 @@ def test_open_with_path_like_object(self):
658661

659662
@unittest.skipIf(sys.platform == "win32", "skipped on Windows")
660663
@unittest.skipIf(sys.platform == "darwin", "skipped on macOS")
664+
@unittest.skipIf(is_emscripten or is_wasi, "not supported on Emscripten/WASI")
661665
@unittest.skipUnless(TESTFN_UNDECODABLE, "only works if there are undecodable paths")
662666
def test_open_with_undecodable_path(self):
663667
path = TESTFN_UNDECODABLE
@@ -703,6 +707,7 @@ def test_open_uri_readonly(self):
703707

704708
@unittest.skipIf(sys.platform == "win32", "skipped on Windows")
705709
@unittest.skipIf(sys.platform == "darwin", "skipped on macOS")
710+
@unittest.skipIf(is_emscripten or is_wasi, "not supported on Emscripten/WASI")
706711
@unittest.skipUnless(TESTFN_UNDECODABLE, "only works if there are undecodable paths")
707712
def test_open_undecodable_uri(self):
708713
path = TESTFN_UNDECODABLE
@@ -1458,6 +1463,7 @@ def test_blob_closed_db_read(self):
14581463
blob.read)
14591464

14601465

1466+
@threading_helper.requires_working_threading()
14611467
class ThreadTests(unittest.TestCase):
14621468
def setUp(self):
14631469
self.con = sqlite.connect(":memory:")
@@ -1822,6 +1828,7 @@ def test_on_conflict_replace(self):
18221828
self.assertEqual(self.cu.fetchall(), [('Very different data!', 'foo')])
18231829

18241830

1831+
@requires_subprocess()
18251832
class MultiprocessTests(unittest.TestCase):
18261833
CONNECTION_TIMEOUT = SHORT_TIMEOUT / 1000. # Defaults to 30 ms
18271834

0 commit comments

Comments
 (0)