contextvars by youknowone · Pull Request #5300 · RustPython/RustPython
try: from _testcapi import hamt from _testinternalcapi import hamt except ImportError: hamt = None
self.assertNotEqual(hash(c), hash('aaa'))
# TODO: RUSTPYTHON @unittest.expectedFailure @isolated_context def test_context_var_repr_1(self): c = contextvars.ContextVar('a')
# TODO: RUSTPYTHON @unittest.expectedFailure def test_context_get_context_1(self): ctx = contextvars.copy_context() self.assertIsInstance(ctx, contextvars.Context)
# TODO: RUSTPYTHON @unittest.expectedFailure def test_context_run_2(self): ctx = contextvars.Context()
# TODO: RUSTPYTHON @unittest.expectedFailure def test_context_run_3(self): ctx = contextvars.Context()
# TODO: RUSTPYTHON @unittest.expectedFailure def test_context_run_5(self): ctx = contextvars.Context() var = contextvars.ContextVar('var')
self.assertIsNone(var.get(None))
# TODO: RUSTPYTHON @unittest.expectedFailure def test_context_run_6(self): ctx = contextvars.Context() c = contextvars.ContextVar('a', default=0)
ctx.run(fun)
# TODO: RUSTPYTHON @unittest.expectedFailure def test_context_run_7(self): ctx = contextvars.Context()
# TODO: RUSTPYTHON @unittest.expectedFailure @isolated_context def test_context_getset_2(self): v1 = contextvars.ContextVar('v1')
# TODO: RUSTPYTHON @unittest.expectedFailure @isolated_context def test_context_getset_3(self): c = contextvars.ContextVar('c', default=42)
ctx.run(fun)
# TODO: RUSTPYTHON @unittest.expectedFailure @isolated_context def test_context_getset_4(self): c = contextvars.ContextVar('c', default=42)
ctx1.run(ctx1_fun)
# TODO: RUSTPYTHON @unittest.expectedFailure @isolated_context @threading_helper.requires_working_threading() def test_context_threads_1(self):
@unittest.skipIf(hamt is None, '_testcapi lacks "hamt()" function') @unittest.skipIf(hamt is None, '_testinternalcapi.hamt() not available') class HamtTest(unittest.TestCase):
def test_hashkey_helper_1(self):