Skip to content

Commit 629105f

Browse files
committed
For CI, need to reset NESTML module-level state _before_ as well as after each test
1 parent c61e613 commit 629105f

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

test/system/test_nest_nestml.py

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,15 @@
1919

2020
@pytest.fixture(autouse=True)
2121
def reset_nestml_state():
22-
"""Reset NESTML module-level state between tests so registrations don't bleed across."""
22+
"""Reset NESTML module-level state before and after each test.
23+
24+
Resets both before (so state left by non-NESTML tests in the same worker doesn't bleed
25+
in) and after (so state left by this test doesn't bleed into subsequent tests).
26+
"""
27+
if have_nest:
28+
from pyNN.nest import nestml
29+
nestml._compiled = False
30+
nestml._pending.clear()
2331
yield
2432
if have_nest:
2533
from pyNN.nest import nestml

0 commit comments

Comments
 (0)