summaryrefslogtreecommitdiffstats
path: root/Lib/test
diff options
context:
space:
mode:
Diffstat (limited to 'Lib/test')
-rw-r--r--Lib/test/_test_multiprocessing.py2
-rw-r--r--Lib/test/test_baseexception.py2
-rw-r--r--Lib/test/test_class.py2
-rw-r--r--Lib/test/test_collections.py6
-rwxr-xr-xLib/test/test_dataclasses.py2
-rw-r--r--Lib/test/test_functools.py2
-rw-r--r--Lib/test/test_generators.py2
-rw-r--r--Lib/test/test_importlib/builtin/test_finder.py2
-rw-r--r--Lib/test/test_importlib/source/test_file_loader.py2
-rw-r--r--Lib/test/test_inspect.py2
-rw-r--r--Lib/test/test_io.py2
-rw-r--r--Lib/test/test_largefile.py2
-rw-r--r--Lib/test/test_logging.py50
-rw-r--r--Lib/test/test_math.py2
-rw-r--r--Lib/test/test_parser.py2
-rw-r--r--Lib/test/test_random.py2
-rw-r--r--Lib/test/test_site.py2
-rw-r--r--Lib/test/test_socket.py4
-rw-r--r--Lib/test/test_ssl.py2
-rw-r--r--Lib/test/test_sys_settrace.py2
-rw-r--r--Lib/test/test_xml_etree.py2
-rw-r--r--Lib/test/test_zipapp.py8
22 files changed, 52 insertions, 52 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index dbca2d8..6038553 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -4115,7 +4115,7 @@ class TestNoForkBomb(unittest.TestCase):
#
class TestForkAwareThreadLock(unittest.TestCase):
- # We recurisvely start processes. Issue #17555 meant that the
+ # We recursively start processes. Issue #17555 meant that the
# after fork registry would get duplicate entries for the same
# lock. The size of the registry at generation n was ~2**n.
diff --git a/Lib/test/test_baseexception.py b/Lib/test/test_baseexception.py
index c055ee3..c324682 100644
--- a/Lib/test/test_baseexception.py
+++ b/Lib/test/test_baseexception.py
@@ -163,7 +163,7 @@ class UsageTests(unittest.TestCase):
self.raise_fails("spam")
def test_catch_non_BaseException(self):
- # Tryinng to catch an object that does not inherit from BaseException
+ # Trying to catch an object that does not inherit from BaseException
# is not allowed.
class NonBaseException(object):
pass
diff --git a/Lib/test/test_class.py b/Lib/test/test_class.py
index a916e87..841cac9 100644
--- a/Lib/test/test_class.py
+++ b/Lib/test/test_class.py
@@ -617,7 +617,7 @@ class ClassTests(unittest.TestCase):
with self.assertRaisesRegex(TypeError, r'C\(\).__init__\(\) takes no arguments'):
object.__init__(C(), 42)
- # Class with both `__init__` & `__new__` method overriden
+ # Class with both `__init__` & `__new__` method overridden
class D:
def __new__(cls, *args, **kwargs):
super().__new__(cls, *args, **kwargs)
diff --git a/Lib/test/test_collections.py b/Lib/test/test_collections.py
index 7e106af..6c466f4 100644
--- a/Lib/test/test_collections.py
+++ b/Lib/test/test_collections.py
@@ -558,7 +558,7 @@ class TestOneTrickPonyABCs(ABCTestCase):
c = new_coro()
self.assertIsInstance(c, Awaitable)
- c.close() # awoid RuntimeWarning that coro() was not awaited
+ c.close() # avoid RuntimeWarning that coro() was not awaited
class CoroLike: pass
Coroutine.register(CoroLike)
@@ -608,7 +608,7 @@ class TestOneTrickPonyABCs(ABCTestCase):
c = new_coro()
self.assertIsInstance(c, Coroutine)
- c.close() # awoid RuntimeWarning that coro() was not awaited
+ c.close() # avoid RuntimeWarning that coro() was not awaited
class CoroLike:
def send(self, value):
@@ -1615,7 +1615,7 @@ class TestCollectionABCs(ABCTestCase):
'__len__', '__getitem__', '__setitem__', '__delitem__', 'insert')
def test_MutableSequence_mixins(self):
- # Test the mixins of MutableSequence by creating a miminal concrete
+ # Test the mixins of MutableSequence by creating a minimal concrete
# class inherited from it.
class MutableSequenceSubclass(MutableSequence):
def __init__(self):
diff --git a/Lib/test/test_dataclasses.py b/Lib/test/test_dataclasses.py
index 9d08a2d..18ca202 100755
--- a/Lib/test/test_dataclasses.py
+++ b/Lib/test/test_dataclasses.py
@@ -998,7 +998,7 @@ class TestCase(unittest.TestCase):
self.assertEqual(C().x, 0)
self.assertEqual(C(2).x, 4)
- # Make sure that if we'r frozen, post-init can't set
+ # Make sure that if we're frozen, post-init can't set
# attributes.
@dataclass(frozen=True)
class C:
diff --git a/Lib/test/test_functools.py b/Lib/test/test_functools.py
index 35ec2e2..2245b97 100644
--- a/Lib/test/test_functools.py
+++ b/Lib/test/test_functools.py
@@ -420,7 +420,7 @@ class TestPartialC(TestPartial, unittest.TestCase):
p.keywords[self] = ['sth2']
return 'astr'
- # Raplacing the value during key formatting should keep the original
+ # Replacing the value during key formatting should keep the original
# value alive (at least long enough).
p.keywords[MutatesYourDict()] = ['sth']
r = repr(p)
diff --git a/Lib/test/test_generators.py b/Lib/test/test_generators.py
index f88c762..bd17ad4 100644
--- a/Lib/test/test_generators.py
+++ b/Lib/test/test_generators.py
@@ -1458,7 +1458,7 @@ class Knights:
# If we create a square with one exit, we must visit it next;
# else somebody else will have to visit it, and since there's
# only one adjacent, there won't be a way to leave it again.
- # Finelly, if we create more than one free square with a
+ # Finally, if we create more than one free square with a
# single exit, we can only move to one of them next, leaving
# the other one a dead end.
ne0 = ne1 = 0
diff --git a/Lib/test/test_importlib/builtin/test_finder.py b/Lib/test/test_importlib/builtin/test_finder.py
index a2e6e1e..084f3de 100644
--- a/Lib/test/test_importlib/builtin/test_finder.py
+++ b/Lib/test/test_importlib/builtin/test_finder.py
@@ -22,7 +22,7 @@ class FindSpecTests(abc.FinderTests):
# Built-in modules cannot be a package.
test_package = None
- # Built-in modules cannobt be in a package.
+ # Built-in modules cannot be in a package.
test_module_in_package = None
# Built-in modules cannot be a package.
diff --git a/Lib/test/test_importlib/source/test_file_loader.py b/Lib/test/test_importlib/source/test_file_loader.py
index 643a02c..cc80f26 100644
--- a/Lib/test/test_importlib/source/test_file_loader.py
+++ b/Lib/test/test_importlib/source/test_file_loader.py
@@ -267,7 +267,7 @@ class SimpleTest(abc.LoaderTests):
)
@util.writes_bytecode_files
- def test_overriden_checked_hash_based_pyc(self):
+ def test_overridden_checked_hash_based_pyc(self):
with util.create_modules('_temp') as mapping, \
unittest.mock.patch('_imp.check_hash_based_pycs', 'never'):
source = mapping['_temp']
diff --git a/Lib/test/test_inspect.py b/Lib/test/test_inspect.py
index 13a86b1..5b5bc65 100644
--- a/Lib/test/test_inspect.py
+++ b/Lib/test/test_inspect.py
@@ -1569,7 +1569,7 @@ class TestGetattrStatic(unittest.TestCase):
foo.__dict__['d'] = 1
self.assertEqual(inspect.getattr_static(foo, 'd'), 1)
- # if the descriptor is a data-desciptor we should return the
+ # if the descriptor is a data-descriptor we should return the
# descriptor
descriptor.__set__ = lambda s, i, v: None
self.assertEqual(inspect.getattr_static(foo, 'd'), Foo.__dict__['d'])
diff --git a/Lib/test/test_io.py b/Lib/test/test_io.py
index 6674831..9bfe4b0 100644
--- a/Lib/test/test_io.py
+++ b/Lib/test/test_io.py
@@ -579,7 +579,7 @@ class IOTest(unittest.TestCase):
self.read_ops(f, True)
def test_large_file_ops(self):
- # On Windows and Mac OSX this test comsumes large resources; It takes
+ # On Windows and Mac OSX this test consumes large resources; It takes
# a long time to build the >2 GiB file and takes >2 GiB of disk space
# therefore the resource must be enabled to run this test.
if sys.platform[:3] == 'win' or sys.platform == 'darwin':
diff --git a/Lib/test/test_largefile.py b/Lib/test/test_largefile.py
index f409c5b..21296cc 100644
--- a/Lib/test/test_largefile.py
+++ b/Lib/test/test_largefile.py
@@ -141,7 +141,7 @@ def setUpModule():
except (ImportError, AttributeError):
pass
- # On Windows and Mac OSX this test comsumes large resources; It
+ # On Windows and Mac OSX this test consumes large resources; It
# takes a long time to build the >2 GiB file and takes >2 GiB of disk
# space therefore the resource must be enabled to run this test.
# If not, nothing after this line stanza will be executed.
diff --git a/Lib/test/test_logging.py b/Lib/test/test_logging.py
index 7101e3b..54049d2 100644
--- a/Lib/test/test_logging.py
+++ b/Lib/test/test_logging.py
@@ -178,7 +178,7 @@ class BuiltinLevelsTest(BaseTest):
"""Test builtin levels and their inheritance."""
def test_flat(self):
- #Logging levels in a flat logger namespace.
+ # Logging levels in a flat logger namespace.
m = self.next_message
ERR = logging.getLogger("ERR")
@@ -248,7 +248,7 @@ class BuiltinLevelsTest(BaseTest):
])
def test_nested_inherited(self):
- #Logging levels in a nested namespace, inherited from parent loggers.
+ # Logging levels in a nested namespace, inherited from parent loggers.
m = self.next_message
INF = logging.getLogger("INF")
@@ -1913,9 +1913,9 @@ class EncodingTest(BaseTest):
def test_encoding_cyrillic_unicode(self):
log = logging.getLogger("test")
- #Get a message in Unicode: Do svidanya in Cyrillic (meaning goodbye)
+ # Get a message in Unicode: Do svidanya in Cyrillic (meaning goodbye)
message = '\u0434\u043e \u0441\u0432\u0438\u0434\u0430\u043d\u0438\u044f'
- #Ensure it's written in a Cyrillic encoding
+ # Ensure it's written in a Cyrillic encoding
writer_class = codecs.getwriter('cp1251')
writer_class.encoding = 'cp1251'
stream = io.BytesIO()
@@ -1929,7 +1929,7 @@ class EncodingTest(BaseTest):
handler.close()
# check we wrote exactly those bytes, ignoring trailing \n etc
s = stream.getvalue()
- #Compare against what the data should be when encoded in CP-1251
+ # Compare against what the data should be when encoded in CP-1251
self.assertEqual(s, b'\xe4\xee \xf1\xe2\xe8\xe4\xe0\xed\xe8\xff\n')
@@ -1950,7 +1950,7 @@ class WarningsTest(BaseTest):
h.close()
self.assertGreater(s.find("UserWarning: I'm warning you...\n"), 0)
- #See if an explicit file uses the original implementation
+ # See if an explicit file uses the original implementation
a_file = io.StringIO()
warnings.showwarning("Explicit", UserWarning, "dummy.py", 42,
a_file, "Dummy line")
@@ -2091,7 +2091,7 @@ class ConfigDictTest(BaseTest):
},
}
- #As config1 but with a misspelt level on a handler
+ # As config1 but with a misspelt level on a handler
config2a = {
'version': 1,
'formatters': {
@@ -2119,7 +2119,7 @@ class ConfigDictTest(BaseTest):
}
- #As config1 but with a misspelt level on a logger
+ # As config1 but with a misspelt level on a logger
config2b = {
'version': 1,
'formatters': {
@@ -2286,8 +2286,8 @@ class ConfigDictTest(BaseTest):
},
}
- #config 7 does not define compiler.parser but defines compiler.lexer
- #so compiler.parser should be disabled after applying it
+ # config 7 does not define compiler.parser but defines compiler.lexer
+ # so compiler.parser should be disabled after applying it
config7 = {
'version': 1,
'formatters': {
@@ -2432,7 +2432,7 @@ class ConfigDictTest(BaseTest):
},
}
- #As config1 but with a filter added
+ # As config1 but with a filter added
config10 = {
'version': 1,
'formatters': {
@@ -2466,7 +2466,7 @@ class ConfigDictTest(BaseTest):
},
}
- #As config1 but using cfg:// references
+ # As config1 but using cfg:// references
config11 = {
'version': 1,
'true_formatters': {
@@ -2497,7 +2497,7 @@ class ConfigDictTest(BaseTest):
},
}
- #As config11 but missing the version key
+ # As config11 but missing the version key
config12 = {
'true_formatters': {
'form1' : {
@@ -2527,7 +2527,7 @@ class ConfigDictTest(BaseTest):
},
}
- #As config11 but using an unsupported version
+ # As config11 but using an unsupported version
config13 = {
'version': 2,
'true_formatters': {
@@ -2728,7 +2728,7 @@ class ConfigDictTest(BaseTest):
# Original logger output is empty.
self.assert_log_lines([])
- #Same as test_config_7_ok but don't disable old loggers.
+ # Same as test_config_7_ok but don't disable old loggers.
def test_config_8_ok(self):
with support.captured_stdout() as output:
self.apply_config(self.config1)
@@ -2809,15 +2809,15 @@ class ConfigDictTest(BaseTest):
with support.captured_stdout() as output:
self.apply_config(self.config9)
logger = logging.getLogger("compiler.parser")
- #Nothing will be output since both handler and logger are set to WARNING
+ # Nothing will be output since both handler and logger are set to WARNING
logger.info(self.next_message())
self.assert_log_lines([], stream=output)
self.apply_config(self.config9a)
- #Nothing will be output since both handler is still set to WARNING
+ # Nothing will be output since handler is still set to WARNING
logger.info(self.next_message())
self.assert_log_lines([], stream=output)
self.apply_config(self.config9b)
- #Message should now be output
+ # Message should now be output
logger.info(self.next_message())
self.assert_log_lines([
('INFO', '3'),
@@ -2829,13 +2829,13 @@ class ConfigDictTest(BaseTest):
logger = logging.getLogger("compiler.parser")
logger.warning(self.next_message())
logger = logging.getLogger('compiler')
- #Not output, because filtered
+ # Not output, because filtered
logger.warning(self.next_message())
logger = logging.getLogger('compiler.lexer')
- #Not output, because filtered
+ # Not output, because filtered
logger.warning(self.next_message())
logger = logging.getLogger("compiler.parser.codegen")
- #Output, as not filtered
+ # Output, as not filtered
logger.error(self.next_message())
self.assert_log_lines([
('WARNING', '1'),
@@ -2894,13 +2894,13 @@ class ConfigDictTest(BaseTest):
logger = logging.getLogger("compiler.parser")
logger.warning(self.next_message())
logger = logging.getLogger('compiler')
- #Not output, because filtered
+ # Not output, because filtered
logger.warning(self.next_message())
logger = logging.getLogger('compiler.lexer')
- #Not output, because filtered
+ # Not output, because filtered
logger.warning(self.next_message())
logger = logging.getLogger("compiler.parser.codegen")
- #Output, as not filtered
+ # Output, as not filtered
logger.error(self.next_message())
self.assert_log_lines([
('WARNING', '1'),
@@ -4335,7 +4335,7 @@ class TimedRotatingFileHandlerTest(BaseFileTest):
break
msg = 'No rotated files found, went back %d seconds' % GO_BACK
if not found:
- #print additional diagnostics
+ # print additional diagnostics
dn, fn = os.path.split(self.fn)
files = [f for f in os.listdir(dn) if f.startswith(fn)]
print('Test time: %s' % now.strftime("%Y-%m-%d %H-%M-%S"), file=sys.stderr)
diff --git a/Lib/test/test_math.py b/Lib/test/test_math.py
index 70cb574..44785d3 100644
--- a/Lib/test/test_math.py
+++ b/Lib/test/test_math.py
@@ -1423,7 +1423,7 @@ class MathTests(unittest.TestCase):
class IsCloseTests(unittest.TestCase):
- isclose = math.isclose # sublcasses should override this
+ isclose = math.isclose # subclasses should override this
def assertIsClose(self, a, b, *args, **kwargs):
self.assertTrue(self.isclose(a, b, *args, **kwargs),
diff --git a/Lib/test/test_parser.py b/Lib/test/test_parser.py
index 647d391..2f1b219 100644
--- a/Lib/test/test_parser.py
+++ b/Lib/test/test_parser.py
@@ -30,7 +30,7 @@ class RoundtripLegalSyntaxTestCase(unittest.TestCase):
self.roundtrip(parser.expr, s)
def test_flags_passed(self):
- # The unicode literals flags has to be passed from the paser to AST
+ # The unicode literals flags has to be passed from the parser to AST
# generation.
suite = parser.suite("from __future__ import unicode_literals; x = ''")
code = suite.compile()
diff --git a/Lib/test/test_random.py b/Lib/test/test_random.py
index e2db723..468c4a4 100644
--- a/Lib/test/test_random.py
+++ b/Lib/test/test_random.py
@@ -24,7 +24,7 @@ class TestBasicOps:
self.gen.seed()
state1 = self.gen.getstate()
time.sleep(0.1)
- self.gen.seed() # diffent seeds at different times
+ self.gen.seed() # different seeds at different times
state2 = self.gen.getstate()
self.assertNotEqual(state1, state2)
diff --git a/Lib/test/test_site.py b/Lib/test/test_site.py
index 99e7b4f..266adf0 100644
--- a/Lib/test/test_site.py
+++ b/Lib/test/test_site.py
@@ -274,7 +274,7 @@ class HelperFunctionsTests(unittest.TestCase):
'site-packages')
self.assertEqual(dirs[1], wanted)
elif os.sep == '/':
- # OS X non-framwework builds, Linux, FreeBSD, etc
+ # OS X non-framework builds, Linux, FreeBSD, etc
self.assertEqual(len(dirs), 1)
wanted = os.path.join('xoxo', 'lib',
'python%d.%d' % sys.version_info[:2],
diff --git a/Lib/test/test_socket.py b/Lib/test/test_socket.py
index b97a768..5b4c5f9 100644
--- a/Lib/test/test_socket.py
+++ b/Lib/test/test_socket.py
@@ -1444,7 +1444,7 @@ class GeneralModuleTests(unittest.TestCase):
socket.gethostbyname(domain)
socket.gethostbyname_ex(domain)
socket.getaddrinfo(domain,0,socket.AF_UNSPEC,socket.SOCK_STREAM)
- # this may not work if the forward lookup choses the IPv6 address, as that doesn't
+ # this may not work if the forward lookup chooses the IPv6 address, as that doesn't
# have a reverse entry yet
# socket.gethostbyaddr('испытание.python.org')
@@ -4399,7 +4399,7 @@ class UnbufferedFileObjectClassTestCase(FileObjectClassTestCase):
self.write_file.write(self.write_msg)
self.write_file.flush()
self.evt2.set()
- # Avoid cloding the socket before the server test has finished,
+ # Avoid closing the socket before the server test has finished,
# otherwise system recv() will return 0 instead of EWOULDBLOCK.
self.serv_finished.wait(5.0)
diff --git a/Lib/test/test_ssl.py b/Lib/test/test_ssl.py
index c65290b..98d3e57 100644
--- a/Lib/test/test_ssl.py
+++ b/Lib/test/test_ssl.py
@@ -850,7 +850,7 @@ class BasicSocketTests(unittest.TestCase):
self.cert_time_ok("Jan 5 09:34:61 2018 GMT", 1515144901)
self.cert_time_fail("Jan 5 09:34:62 2018 GMT") # invalid seconds
- # no special treatement for the special value:
+ # no special treatment for the special value:
# 99991231235959Z (rfc 5280)
self.cert_time_ok("Dec 31 23:59:59 9999 GMT", 253402300799.0)
diff --git a/Lib/test/test_sys_settrace.py b/Lib/test/test_sys_settrace.py
index ed9e6d4..51dd9d9 100644
--- a/Lib/test/test_sys_settrace.py
+++ b/Lib/test/test_sys_settrace.py
@@ -16,7 +16,7 @@ basic.events = [(0, 'call'),
# Many of the tests below are tricky because they involve pass statements.
# If there is implicit control flow around a pass statement (in an except
-# clause or else caluse) under what conditions do you set a line number
+# clause or else clause) under what conditions do you set a line number
# following that clause?
diff --git a/Lib/test/test_xml_etree.py b/Lib/test/test_xml_etree.py
index 02812f3..f2e3f8d 100644
--- a/Lib/test/test_xml_etree.py
+++ b/Lib/test/test_xml_etree.py
@@ -2332,7 +2332,7 @@ class ElementIterTest(unittest.TestCase):
sourcefile = serialize(doc, to_string=False)
self.assertEqual(next(ET.iterparse(sourcefile))[0], 'end')
- # With an explitit parser too (issue #9708)
+ # With an explicit parser too (issue #9708)
sourcefile = serialize(doc, to_string=False)
parser = ET.XMLParser(target=ET.TreeBuilder())
self.assertEqual(next(ET.iterparse(sourcefile, parser=parser))[0],
diff --git a/Lib/test/test_zipapp.py b/Lib/test/test_zipapp.py
index 948833b..73bddc7 100644
--- a/Lib/test/test_zipapp.py
+++ b/Lib/test/test_zipapp.py
@@ -365,7 +365,7 @@ class ZipAppCmdlineTest(unittest.TestCase):
args = [str(original), '-o', str(original)]
with self.assertRaises(SystemExit) as cm:
zipapp.main(args)
- # Program should exit with a non-zero returm code.
+ # Program should exit with a non-zero return code.
self.assertTrue(cm.exception.code)
def test_cmdline_copy_change_main(self):
@@ -375,7 +375,7 @@ class ZipAppCmdlineTest(unittest.TestCase):
args = [str(original), '-o', str(target), '-m', 'foo:bar']
with self.assertRaises(SystemExit) as cm:
zipapp.main(args)
- # Program should exit with a non-zero returm code.
+ # Program should exit with a non-zero return code.
self.assertTrue(cm.exception.code)
@patch('sys.stdout', new_callable=io.StringIO)
@@ -385,7 +385,7 @@ class ZipAppCmdlineTest(unittest.TestCase):
args = [str(target), '--info']
with self.assertRaises(SystemExit) as cm:
zipapp.main(args)
- # Program should exit with a zero returm code.
+ # Program should exit with a zero return code.
self.assertEqual(cm.exception.code, 0)
self.assertEqual(mock_stdout.getvalue(), "Interpreter: <none>\n")
@@ -395,7 +395,7 @@ class ZipAppCmdlineTest(unittest.TestCase):
args = [str(target), '--info']
with self.assertRaises(SystemExit) as cm:
zipapp.main(args)
- # Program should exit with a non-zero returm code.
+ # Program should exit with a non-zero return code.
self.assertTrue(cm.exception.code)