Skip to content

Commit 56267bd

Browse files
committed
Merge two tests (3)
1 parent cc04c6f commit 56267bd

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Lib/test/datetimetester.py

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7367,15 +7367,19 @@ def gen():
73677367
res = self.assert_python_in_subinterp(True, script, setup='')
73687368
self.assertFalse(res.err)
73697369

7370-
def test_static_type_at_shutdown3(self):
73717370
script = textwrap.dedent("""
7371+
import sys
73727372
timedelta = _testcapi.get_capi_types()['timedelta']
73737373
73747374
def gen():
73757375
try:
73767376
yield
73777377
finally:
7378-
timedelta(days=1)
7378+
# Exceptions are ignored here
7379+
assert not sys.modules
7380+
td = timedelta(days=1)
7381+
assert td.days == 1
7382+
assert not sys.modules
73797383
73807384
it = gen()
73817385
next(it)

0 commit comments

Comments
 (0)