Skip to content

Commit c490586

Browse files
committed
Nit
1 parent 124d650 commit c490586

File tree

2 files changed

+8
-9
lines changed

2 files changed

+8
-9
lines changed

Lib/test/datetimetester.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7290,7 +7290,7 @@ def gen():
72907290
72917291
it = gen()
72927292
next(it)
7293-
""")
7293+
""")
72947294
res = script_helper.assert_python_ok('-c', script)
72957295
self.assertFalse(res.err)
72967296

@@ -7310,7 +7310,7 @@ def gen():
73107310
73117311
it = gen()
73127312
next(it)
7313-
""")
7313+
""")
73147314
res = script_helper.assert_python_ok('-c', script)
73157315
self.assertFalse(res.err)
73167316

@@ -7365,10 +7365,10 @@ def test_static_type_at_shutdown3(self):
73657365
timedelta = module.get_delta_type()
73667366
73677367
def gen():
7368-
try:
7369-
yield
7370-
finally:
7371-
timedelta(days=1)
7368+
try:
7369+
yield
7370+
finally:
7371+
timedelta(days=1)
73727372
73737373
it = gen()
73747374
next(it)
@@ -7401,7 +7401,7 @@ def test_remain_only_one_module(self):
74017401
del _datetime
74027402
gc.collect()
74037403
assert len(ws) == 1
7404-
""")
7404+
""")
74057405
res = script_helper.assert_python_ok('-c', script)
74067406
self.assertFalse(res.err)
74077407

@@ -7410,7 +7410,7 @@ def test_no_leak(self):
74107410
script = textwrap.dedent("""
74117411
import datetime
74127412
datetime.datetime.strptime('20000101', '%Y%m%d').strftime('%Y%m%d')
7413-
""")
7413+
""")
74147414
res = script_helper.assert_python_ok('-X', 'showrefcount', '-c', script)
74157415
self.assertIn(b'[0 refs, 0 blocks]', res.err)
74167416

Modules/_datetimemodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -175,7 +175,6 @@ _get_current_state(PyObject **p_mod)
175175
mod = PyImport_ImportModule("_datetime");
176176
if (mod == NULL) {
177177
assert(_Py_IsInterpreterFinalizing(interp));
178-
/* We do not take care of the unlikely case. */
179178
return NULL;
180179
}
181180
}

0 commit comments

Comments
 (0)