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 cc04c6f commit 56267bdCopy full SHA for 56267bd
Lib/test/datetimetester.py
@@ -7367,15 +7367,19 @@ def gen():
7367
res = self.assert_python_in_subinterp(True, script, setup='')
7368
self.assertFalse(res.err)
7369
7370
- def test_static_type_at_shutdown3(self):
7371
script = textwrap.dedent("""
+ import sys
7372
timedelta = _testcapi.get_capi_types()['timedelta']
7373
7374
def gen():
7375
try:
7376
yield
7377
finally:
7378
- timedelta(days=1)
+ # Exceptions are ignored here
7379
+ assert not sys.modules
7380
+ td = timedelta(days=1)
7381
+ assert td.days == 1
7382
7383
7384
it = gen()
7385
next(it)
0 commit comments