diff --git a/src/_pytest/_code/code.py b/src/_pytest/_code/code.py index b778c0db605..19d2a0e706a 100644 --- a/src/_pytest/_code/code.py +++ b/src/_pytest/_code/code.py @@ -137,7 +137,7 @@ def eval(self, code, **vars): def exec_(self, code, **vars): """ exec 'code' in the frame - 'vars' are optiona; additional local variables + 'vars' are optional; additional local variables """ f_locals = self.f_locals.copy() f_locals.update(vars) @@ -207,7 +207,7 @@ def path(self): @property def locals(self): - """ locals of underlaying frame """ + """ locals of underlying frame """ return self.frame.f_locals def getfirstlinesource(self): @@ -274,7 +274,7 @@ def __str__(self): @property def name(self): - """ co_name of underlaying code """ + """ co_name of underlying code """ return self.frame.code.raw.co_name @@ -302,7 +302,7 @@ def f(cur): def cut(self, path=None, lineno=None, firstlineno=None, excludepath=None): """ return a Traceback instance wrapping part of this Traceback - by provding any combination of path, lineno and firstlineno, the + by providing any combination of path, lineno and firstlineno, the first frame to start the to-be-returned traceback is determined this allows cutting the first part of a Traceback instance e.g. @@ -1003,7 +1003,7 @@ def __init__(self, path, lineno, message): def toterminal(self, tw): # filename and lineno output for each entry, - # using an output format that most editors unterstand + # using an output format that most editors understand msg = self.message i = msg.find("\n") if i != -1: diff --git a/src/_pytest/junitxml.py b/src/_pytest/junitxml.py index ba0f48ed39d..fb951106fc4 100644 --- a/src/_pytest/junitxml.py +++ b/src/_pytest/junitxml.py @@ -513,7 +513,7 @@ def node_reporter(self, report): key = nodeid, slavenode if key in self.node_reporters: - # TODO: breasks for --dist=each + # TODO: breaks for --dist=each return self.node_reporters[key] reporter = _NodeReporter(nodeid, self) diff --git a/src/_pytest/main.py b/src/_pytest/main.py index ad65ed29929..3c205027d9f 100644 --- a/src/_pytest/main.py +++ b/src/_pytest/main.py @@ -429,7 +429,7 @@ def gethookproxy(self, fspath): # one or more conftests are not in use at this fspath proxy = FSHookProxy(fspath, pm, remove_mods) else: - # all plugis are active for this fspath + # all plugins are active for this fspath proxy = self.config.hook return proxy diff --git a/src/_pytest/mark/evaluate.py b/src/_pytest/mark/evaluate.py index b9f2d61f835..53822e98f08 100644 --- a/src/_pytest/mark/evaluate.py +++ b/src/_pytest/mark/evaluate.py @@ -28,7 +28,7 @@ def __init__(self, item, name): self._mark_name = name def __bool__(self): - # dont cache here to prevent staleness + # don't cache here to prevent staleness return bool(self._get_marks()) __nonzero__ = __bool__ diff --git a/src/_pytest/mark/legacy.py b/src/_pytest/mark/legacy.py index d14ea3a8274..3721e3b0219 100644 --- a/src/_pytest/mark/legacy.py +++ b/src/_pytest/mark/legacy.py @@ -1,6 +1,6 @@ """ this is a place where we put datastructures used by legacy apis -we hope ot remove +we hope to remove """ import keyword diff --git a/src/_pytest/python.py b/src/_pytest/python.py index 913a93bc025..5b8c6adb062 100644 --- a/src/_pytest/python.py +++ b/src/_pytest/python.py @@ -210,8 +210,8 @@ def pytest_pycollect_makeitem(collector, name, obj): # mock seems to store unbound methods (issue473), normalize it obj = getattr(obj, "__func__", obj) # We need to try and unwrap the function if it's a functools.partial - # or a funtools.wrapped. - # We musn't if it's been wrapped with mock.patch (python 2 only) + # or a functools.wrapped. + # We mustn't if it's been wrapped with mock.patch (python 2 only) if not (inspect.isfunction(obj) or inspect.isfunction(get_real_func(obj))): filename, lineno = getfslineno(obj) warnings.warn_explicit( @@ -595,7 +595,7 @@ def gethookproxy(self, fspath): # one or more conftests are not in use at this fspath proxy = FSHookProxy(fspath, pm, remove_mods) else: - # all plugis are active for this fspath + # all plugins are active for this fspath proxy = self.config.hook return proxy diff --git a/src/_pytest/skipping.py b/src/_pytest/skipping.py index 53737816f5c..d18f61ef4f8 100644 --- a/src/_pytest/skipping.py +++ b/src/_pytest/skipping.py @@ -122,7 +122,7 @@ def pytest_runtest_makereport(item, call): outcome = yield rep = outcome.get_result() evalxfail = getattr(item, "_evalxfail", None) - # unitttest special case, see setting of _unexpectedsuccess + # unittest special case, see setting of _unexpectedsuccess if hasattr(item, "_unexpectedsuccess") and rep.when == "call": if item._unexpectedsuccess: @@ -132,7 +132,7 @@ def pytest_runtest_makereport(item, call): rep.outcome = "failed" elif item.config.option.runxfail: - pass # don't interefere + pass # don't interfere elif call.excinfo and call.excinfo.errisinstance(xfail.Exception): rep.wasxfail = "reason: " + call.excinfo.value.msg rep.outcome = "skipped" diff --git a/testing/python/metafunc.py b/testing/python/metafunc.py index 4273ab7962a..5becb0f8c9f 100644 --- a/testing/python/metafunc.py +++ b/testing/python/metafunc.py @@ -15,7 +15,7 @@ class TestMetafunc: def Metafunc(self, func, config=None): # the unit tests of this class check if things work correctly # on the funcarg level, so we don't need a full blown - # initiliazation + # initialization class FixtureInfo: name2fixturedefs = None diff --git a/testing/test_mark.py b/testing/test_mark.py index c8d5851ac64..764d523a36c 100644 --- a/testing/test_mark.py +++ b/testing/test_mark.py @@ -482,7 +482,7 @@ class TestOtherSub(TestBase): items, rec = testdir.inline_genitems(p) base_item, sub_item, sub_item_other = items print(items, [x.nodeid for x in items]) - # new api seregates + # new api segregates assert not list(base_item.iter_markers(name="b")) assert not list(sub_item_other.iter_markers(name="b")) assert list(sub_item.iter_markers(name="b")) diff --git a/testing/test_nose.py b/testing/test_nose.py index 16d8d1fc0e0..8a30755c952 100644 --- a/testing/test_nose.py +++ b/testing/test_nose.py @@ -229,7 +229,7 @@ def test_first(self): def test_apiwrapper_problem_issue260(testdir): # this would end up trying a call an optional teardown on the class - # for plain unittests we dont want nose behaviour + # for plain unittests we don't want nose behaviour testdir.makepyfile( """ import unittest diff --git a/testing/test_parseopt.py b/testing/test_parseopt.py index d39065b8270..915747378f5 100644 --- a/testing/test_parseopt.py +++ b/testing/test_parseopt.py @@ -304,7 +304,7 @@ def test_argcomplete(testdir, monkeypatch): shlex.quote(sys.executable) ) ) - # alternative would be exteneded Testdir.{run(),_run(),popen()} to be able + # alternative would be extended Testdir.{run(),_run(),popen()} to be able # to handle a keyword argument env that replaces os.environ in popen or # extends the copy, advantage: could not forget to restore monkeypatch.setenv("_ARGCOMPLETE", "1") diff --git a/testing/test_pdb.py b/testing/test_pdb.py index d86ba396bee..55a7230f4d1 100644 --- a/testing/test_pdb.py +++ b/testing/test_pdb.py @@ -581,7 +581,7 @@ def test_1(): # No extra newline. assert child.before.endswith(b"c\r\nprint_from_foo\r\n") - # set_debug should not raise outcomes.Exit, if used recrursively. + # set_debug should not raise outcomes. Exit, if used recursively. child.sendline("debug 42") child.sendline("q") child.expect("LEAVING RECURSIVE DEBUGGER") diff --git a/testing/test_stepwise.py b/testing/test_stepwise.py index f61425b6b5b..032351e7f17 100644 --- a/testing/test_stepwise.py +++ b/testing/test_stepwise.py @@ -4,7 +4,7 @@ @pytest.fixture def stepwise_testdir(testdir): # Rather than having to modify our testfile between tests, we introduce - # a flag for wether or not the second test should fail. + # a flag for whether or not the second test should fail. testdir.makeconftest( """ def pytest_addoption(parser):