diff options
author | Christian Heimes <christian@python.org> | 2022-06-23 10:11:35 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-06-23 10:11:35 (GMT) |
commit | cf3f8d4728d75d39c206bcadbd8780e366409ac1 (patch) | |
tree | 03cfc7fff05c284932ed3fc7e5f94153bb9a8d58 | |
parent | 5a692ca5d239922d0c155f8751be1c49d2d66728 (diff) | |
download | cpython-cf3f8d4728d75d39c206bcadbd8780e366409ac1.zip cpython-cf3f8d4728d75d39c206bcadbd8780e366409ac1.tar.gz cpython-cf3f8d4728d75d39c206bcadbd8780e366409ac1.tar.bz2 |
[3.11] gh-84461: Fix test_sqlite for Emscripten/WASI (GH-94125) (GH-94157)
(cherry picked from commit 15bfabd1aabb0335f33202b28f96b4e4062b3bce)
Co-authored-by: Christian Heimes <christian@python.org>
-rw-r--r-- | Lib/test/test_sqlite3/test_dbapi.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/Lib/test/test_sqlite3/test_dbapi.py b/Lib/test/test_sqlite3/test_dbapi.py index 825f335..2aea110 100644 --- a/Lib/test/test_sqlite3/test_dbapi.py +++ b/Lib/test/test_sqlite3/test_dbapi.py @@ -29,7 +29,10 @@ import threading import unittest import urllib.parse -from test.support import SHORT_TIMEOUT, bigmemtest, check_disallow_instantiation +from test.support import ( + SHORT_TIMEOUT, bigmemtest, check_disallow_instantiation, requires_subprocess, + is_emscripten, is_wasi +) from test.support import threading_helper from _testcapi import INT_MAX, ULLONG_MAX from os import SEEK_SET, SEEK_CUR, SEEK_END @@ -658,6 +661,7 @@ class OpenTests(unittest.TestCase): @unittest.skipIf(sys.platform == "win32", "skipped on Windows") @unittest.skipIf(sys.platform == "darwin", "skipped on macOS") + @unittest.skipIf(is_emscripten or is_wasi, "not supported on Emscripten/WASI") @unittest.skipUnless(TESTFN_UNDECODABLE, "only works if there are undecodable paths") def test_open_with_undecodable_path(self): path = TESTFN_UNDECODABLE @@ -703,6 +707,7 @@ class OpenTests(unittest.TestCase): @unittest.skipIf(sys.platform == "win32", "skipped on Windows") @unittest.skipIf(sys.platform == "darwin", "skipped on macOS") + @unittest.skipIf(is_emscripten or is_wasi, "not supported on Emscripten/WASI") @unittest.skipUnless(TESTFN_UNDECODABLE, "only works if there are undecodable paths") def test_open_undecodable_uri(self): path = TESTFN_UNDECODABLE @@ -1458,6 +1463,7 @@ class BlobTests(unittest.TestCase): blob.read) +@threading_helper.requires_working_threading() class ThreadTests(unittest.TestCase): def setUp(self): self.con = sqlite.connect(":memory:") @@ -1822,6 +1828,7 @@ class SqliteOnConflictTests(unittest.TestCase): self.assertEqual(self.cu.fetchall(), [('Very different data!', 'foo')]) +@requires_subprocess() class MultiprocessTests(unittest.TestCase): CONNECTION_TIMEOUT = SHORT_TIMEOUT / 1000. # Defaults to 30 ms |