We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ae709db commit c5aced3Copy full SHA for c5aced3
Lib/test/test_imp.py
@@ -285,13 +285,19 @@ def clean_up():
285
script = textwrap.dedent(f'''
286
import _testsinglephase
287
288
+ expected = %d
289
init_count = _testsinglephase.initialized_count()
- if init_count != %d:
290
+ if init_count != expected:
291
raise Exception(init_count)
292
293
lookedup = _testsinglephase.look_up_self()
294
if lookedup is not _testsinglephase:
295
raise Exception((_testsinglephase, lookedup))
296
+
297
+ # Attrs set after loading are not in m_copy.
298
+ if hasattr(_testsinglephase, 'spam'):
299
+ raise Exception(_testsinglephase.spam)
300
+ _testsinglephase.spam = expected
301
''')
302
303
# Use an interpreter that gets destroyed right away.
0 commit comments