Skip to content

Commit 8e017f8

Browse files
Fix typos.
1 parent d8b73ab commit 8e017f8

File tree

3 files changed

+9
-10
lines changed

3 files changed

+9
-10
lines changed

Lib/test/support/import_helper.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -438,5 +438,5 @@ def ensure_module_imported(name, *, clearnone=True):
438438
if sys.modules.get(name) is not None:
439439
mod = sys.modules[name]
440440
else:
441-
mod, _, _ = _force_import(name, False, True, clearnone)
441+
mod, _, _ = _ensure_module(name, False, True, clearnone)
442442
return mod

Lib/test/test_crossinterp.py

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -404,7 +404,7 @@ def assert_exc_args_equal(self, exc1, exc2):
404404
# Currently the "extra" attrs are not preserved
405405
# (via __reduce__).
406406
self.assertIs(type(exc1), type(exc2))
407-
#self.assert_exc_equal(grouped1, grouped2)
407+
self.assert_exc_equal(grouped1, grouped2)
408408
else:
409409
self.assertEqual(args1, args2)
410410

@@ -435,7 +435,6 @@ def assert_exc_equal(self, exc1, exc2):
435435
def assert_equal_or_equalish(self, obj, expected):
436436
cls = type(expected)
437437
if cls.__eq__ is not object.__eq__:
438-
# assert cls not in (types.MethodType, types.BuiltinMethodType, types.MethodWrapperType), cls
439438
self.assertEqual(obj, expected)
440439
elif cls is types.FunctionType:
441440
self.assert_functions_equal(obj, expected)
@@ -723,13 +722,13 @@ def assert_func_defs_same(self, defs):
723722
def assert_func_defs_other_pickle(self, defs, mod):
724723
# Pickle relative to a different module than the original.
725724
for func in defs.TOP_FUNCTIONS:
726-
assert not hasattr(mod, func.__name__), (cls, getattr(mod, func.__name__))
725+
assert not hasattr(mod, func.__name__), (getattr(mod, func.__name__),)
727726
self.assert_not_shareable(defs.TOP_FUNCTIONS)
728727

729728
def assert_func_defs_other_unpickle(self, defs, mod, *, fail=False):
730729
# Unpickle relative to a different module than the original.
731730
for func in defs.TOP_FUNCTIONS:
732-
assert not hasattr(mod, func.__name__), (cls, getattr(mod, func.__name__))
731+
assert not hasattr(mod, func.__name__), (getattr(mod, func.__name__),)
733732

734733
captured = []
735734
for func in defs.TOP_FUNCTIONS:
@@ -754,7 +753,7 @@ def assert_func_defs_not_shareable(self, defs):
754753
self.assert_not_shareable(defs.TOP_FUNCTIONS)
755754

756755
def test_user_function_normal(self):
757-
# self.assert_roundtrip_equal(defs.TOP_FUNCTIONS)
756+
self.assert_roundtrip_equal(defs.TOP_FUNCTIONS)
758757
self.assert_func_defs_same(defs)
759758

760759
def test_user_func_in___main__(self):
@@ -841,7 +840,7 @@ def test_builtin_exception(self):
841840
special = {
842841
BaseExceptionGroup: (msg, [caught]),
843842
ExceptionGroup: (msg, [caught]),
844-
# UnicodeError: (None, msg, None, None, None),
843+
UnicodeError: (None, msg, None, None, None),
845844
UnicodeEncodeError: ('utf-8', '', 1, 3, msg),
846845
UnicodeDecodeError: ('utf-8', b'', 1, 3, msg),
847846
UnicodeTranslateError: ('', 1, 3, msg),
@@ -1339,8 +1338,8 @@ def test_tuple(self):
13391338

13401339
def test_tuples_containing_non_shareable_types(self):
13411340
non_shareables = [
1342-
EXCEPTION,
1343-
OBJECT,
1341+
EXCEPTION,
1342+
OBJECT,
13441343
]
13451344
for s in non_shareables:
13461345
value = tuple([0, 1.0, s])

Python/crossinterp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -482,7 +482,7 @@ _PyObject_GetXIDataWithFallback(PyThreadState *tstate,
482482
Py_FatalError("unsupported xidata fallback option");
483483
#endif
484484
_PyErr_SetString(tstate, PyExc_SystemError,
485-
"unsuppocted xidata fallback option");
485+
"unsupported xidata fallback option");
486486
return -1;
487487
}
488488
}

0 commit comments

Comments
 (0)