File tree Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Filter options
Lib/test/test_importlib/extension Expand file tree Collapse file tree 1 file changed +10
-9
lines changed
Original file line number Diff line number Diff line change @@ -179,15 +179,16 @@ def test_reload(self):
179
179
180
180
def test_try_registration (self ):
181
181
# Assert that the PyState_{Find,Add,Remove}Module C API doesn't work.
182
- module = self .load_module ()
183
- with self .subTest ('PyState_FindModule' ):
184
- self .assertEqual (module .call_state_registration_func (0 ), None )
185
- with self .subTest ('PyState_AddModule' ):
186
- with self .assertRaises (SystemError ):
187
- module .call_state_registration_func (1 )
188
- with self .subTest ('PyState_RemoveModule' ):
189
- with self .assertRaises (SystemError ):
190
- module .call_state_registration_func (2 )
182
+ with util .uncache (self .name ):
183
+ module = self .load_module ()
184
+ with self .subTest ('PyState_FindModule' ):
185
+ self .assertEqual (module .call_state_registration_func (0 ), None )
186
+ with self .subTest ('PyState_AddModule' ):
187
+ with self .assertRaises (SystemError ):
188
+ module .call_state_registration_func (1 )
189
+ with self .subTest ('PyState_RemoveModule' ):
190
+ with self .assertRaises (SystemError ):
191
+ module .call_state_registration_func (2 )
191
192
192
193
def test_load_submodule (self ):
193
194
# Test loading a simulated submodule.
You can’t perform that action at this time.
0 commit comments