Skip to content

Commit 318888a

Browse files
committed
Nit
1 parent 022d4e8 commit 318888a

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
@@ -7291,7 +7291,7 @@ def gen():
72917291
72927292
it = gen()
72937293
next(it)
7294-
""")
7294+
""")
72957295
res = script_helper.assert_python_ok('-c', script)
72967296
self.assertFalse(res.err)
72977297

@@ -7311,7 +7311,7 @@ def gen():
73117311
73127312
it = gen()
73137313
next(it)
7314-
""")
7314+
""")
73157315
res = script_helper.assert_python_ok('-c', script)
73167316
self.assertFalse(res.err)
73177317

@@ -7366,10 +7366,10 @@ def test_static_type_at_shutdown3(self):
73667366
timedelta = module.get_delta_type()
73677367
73687368
def gen():
7369-
try:
7370-
yield
7371-
finally:
7372-
timedelta(days=1)
7369+
try:
7370+
yield
7371+
finally:
7372+
timedelta(days=1)
73737373
73747374
it = gen()
73757375
next(it)
@@ -7402,7 +7402,7 @@ def test_module_free(self):
74027402
del _datetime
74037403
gc.collect()
74047404
assert len(ws) == 0
7405-
""")
7405+
""")
74067406
res = script_helper.assert_python_ok('-c', script)
74077407
self.assertFalse(res.err)
74087408

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

Modules/_datetimemodule.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,6 @@ _get_current_state(PyObject **p_mod)
155155
PyObject *mod = PyImport_ImportModule("_datetime");
156156
if (mod == NULL) {
157157
assert(_Py_IsInterpreterFinalizing(interp));
158-
/* We do not take care of the unlikely case. */
159158
return NULL;
160159
}
161160
st = get_module_state(mod);

0 commit comments

Comments
 (0)