mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
gh-130095: Mark _py_abc
tests as not thread-safe (gh-130131)
The `_py_abc` implementation is not currently thread-safe (even with the GIL). Don't run these tests with `--parallel-threads=N` for now.
This commit is contained in:
parent
5a586c3e81
commit
39cd9728a6
1 changed files with 10 additions and 4 deletions
|
@ -684,10 +684,16 @@ def test_factory(abc_ABCMeta, abc_get_cache_token):
|
||||||
|
|
||||||
return TestLegacyAPI, TestABC, TestABCWithInitSubclass
|
return TestLegacyAPI, TestABC, TestABCWithInitSubclass
|
||||||
|
|
||||||
TestLegacyAPI_Py, TestABC_Py, TestABCWithInitSubclass_Py = test_factory(abc.ABCMeta,
|
TestLegacyAPI_Py, TestABC_Py, TestABCWithInitSubclass_Py = test_factory(_py_abc.ABCMeta,
|
||||||
abc.get_cache_token)
|
|
||||||
TestLegacyAPI_C, TestABC_C, TestABCWithInitSubclass_C = test_factory(_py_abc.ABCMeta,
|
|
||||||
_py_abc.get_cache_token)
|
_py_abc.get_cache_token)
|
||||||
|
TestLegacyAPI_C, TestABC_C, TestABCWithInitSubclass_C = test_factory(abc.ABCMeta,
|
||||||
|
abc.get_cache_token)
|
||||||
|
|
||||||
|
# gh-130095: The _py_abc tests are not thread-safe when run with
|
||||||
|
# `--parallel-threads`
|
||||||
|
TestLegacyAPI_Py.__unittest_thread_unsafe__ = True
|
||||||
|
TestABC_Py.__unittest_thread_unsafe__ = True
|
||||||
|
TestABCWithInitSubclass_Py.__unittest_thread_unsafe__ = True
|
||||||
|
|
||||||
if __name__ == "__main__":
|
if __name__ == "__main__":
|
||||||
unittest.main()
|
unittest.main()
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue