mirror of
https://github.com/wassname/jaxtyping.git
synced 2026-09-09 11:24:55 +08:00
Fix flakiness of transitive import hook test
This commit is contained in:
committed by
Patrick Kidger
parent
17092ad8d8
commit
4917c2e30f
@@ -125,6 +125,8 @@ def test_import_hook_transitive(importhook_tempdir):
|
||||
with open(transitive_dir / "__init__.py", "w") as f:
|
||||
f.write("from . import tester")
|
||||
f.flush()
|
||||
|
||||
importlib.invalidate_caches()
|
||||
with jaxtyping.install_import_hook(transitive_name, typechecker):
|
||||
importlib.import_module(transitive_name)
|
||||
assert counter + 1 == jaxtyping._test_import_hook_counter
|
||||
|
||||
Reference in New Issue
Block a user