Skip to content

Commit 15bfabd

Browse files
authored
gh-84461: Fix test_sqlite for Emscripten/WASI (#94125)
1 parent fb1e950 commit 15bfabd

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

Lib/test/test_sqlite3/test_dbapi.py

Lines changed: 8 additions & 1 deletion
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, check_disallow_instantiation
32+
from test.support import (
33+
SHORT_TIMEOUT, 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
@@ -653,6 +656,7 @@ def test_open_with_path_like_object(self):
653656

654657
@unittest.skipIf(sys.platform == "win32", "skipped on Windows")
655658
@unittest.skipIf(sys.platform == "darwin", "skipped on macOS")
659+
@unittest.skipIf(is_emscripten or is_wasi, "not supported on Emscripten/WASI")
656660
@unittest.skipUnless(TESTFN_UNDECODABLE, "only works if there are undecodable paths")
657661
def test_open_with_undecodable_path(self):
658662
path = TESTFN_UNDECODABLE
@@ -698,6 +702,7 @@ def test_open_uri_readonly(self):
698702

699703
@unittest.skipIf(sys.platform == "win32", "skipped on Windows")
700704
@unittest.skipIf(sys.platform == "darwin", "skipped on macOS")
705+
@unittest.skipIf(is_emscripten or is_wasi, "not supported on Emscripten/WASI")
701706
@unittest.skipUnless(TESTFN_UNDECODABLE, "only works if there are undecodable paths")
702707
def test_open_undecodable_uri(self):
703708
path = TESTFN_UNDECODABLE
@@ -1453,6 +1458,7 @@ def test_blob_closed_db_read(self):
14531458
blob.read)
14541459

14551460

1461+
@threading_helper.requires_working_threading()
14561462
class ThreadTests(unittest.TestCase):
14571463
def setUp(self):
14581464
self.con = sqlite.connect(":memory:")
@@ -1817,6 +1823,7 @@ def test_on_conflict_replace(self):
18171823
self.assertEqual(self.cu.fetchall(), [('Very different data!', 'foo')])
18181824

18191825

1826+
@requires_subprocess()
18201827
class MultiprocessTests(unittest.TestCase):
18211828
CONNECTION_TIMEOUT = SHORT_TIMEOUT / 1000. # Defaults to 30 ms
18221829

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy