diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-28 05:45:33 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2022-11-28 06:01:22 -0500 |
| commit | aa62abd5ff33926f44fe4ec9e985ed3d72ea1f9d (patch) | |
| tree | 301823a5d57e89561e0761d48cd2cf68a6d501c7 /tests | |
| parent | 79c66c00cfc98f04b676e8fb32dc5f089a5eff3c (diff) | |
| download | python-coveragepy-git-aa62abd5ff33926f44fe4ec9e985ed3d72ea1f9d.tar.gz | |
style: fix spelling
un-executed, white space, time stamp.
Diffstat (limited to 'tests')
| -rw-r--r-- | tests/mixins.py | 2 | ||||
| -rw-r--r-- | tests/test_api.py | 12 | ||||
| -rw-r--r-- | tests/test_html.py | 10 | ||||
| -rw-r--r-- | tests/test_phystokens.py | 2 |
4 files changed, 13 insertions, 13 deletions
diff --git a/tests/mixins.py b/tests/mixins.py index 3d623fb3..9be6d21c 100644 --- a/tests/mixins.py +++ b/tests/mixins.py @@ -99,7 +99,7 @@ class RestoreModulesMixin: # So that we can re-import files, clean them out first. self._sys_module_saver.restore() - # Also have to clean out the .pyc files, since the timestamp + # Also have to clean out the .pyc files, since the time stamp # resolution is only one second, a changed file might not be # picked up. remove_tree("__pycache__") diff --git a/tests/test_api.py b/tests/test_api.py index c2dbefa8..84457d88 100644 --- a/tests/test_api.py +++ b/tests/test_api.py @@ -817,7 +817,7 @@ class IncludeOmitTestsMixin(UsingModulesMixin, CoverageTest): self.filenames_in(result, "p1a p1b p2a p2b othera otherb osa osb") self.filenames_not_in(result, "p1c") # Because there was no source= specified, we don't search for - # unexecuted files. + # un-executed files. def test_include(self): result = self.coverage_usepkgs(include=["*/p1a.py"]) @@ -902,7 +902,7 @@ class SourceIncludeOmitTest(IncludeOmitTestsMixin, CoverageTest): lines = self.coverage_usepkgs(source=["pkg1"]) self.filenames_in(lines, "p1a p1b") self.filenames_not_in(lines, "p2a p2b othera otherb osa osb") - # Because source= was specified, we do search for unexecuted files. + # Because source= was specified, we do search for un-executed files. assert lines['p1c'] == 0 def test_source_package_as_dir(self): @@ -911,13 +911,13 @@ class SourceIncludeOmitTest(IncludeOmitTestsMixin, CoverageTest): lines = self.coverage_usepkgs(source=["pkg1"]) self.filenames_in(lines, "p1a p1b") self.filenames_not_in(lines, "p2a p2b othera otherb osa osb") - # Because source= was specified, we do search for unexecuted files. + # Because source= was specified, we do search for un-executed files. assert lines['p1c'] == 0 def test_source_package_dotted_sub(self): lines = self.coverage_usepkgs(source=["pkg1.sub"]) self.filenames_not_in(lines, "p2a p2b othera otherb osa osb") - # Because source= was specified, we do search for unexecuted files. + # Because source= was specified, we do search for un-executed files. assert lines['runmod3'] == 0 def test_source_package_dotted_p1b(self): @@ -929,7 +929,7 @@ class SourceIncludeOmitTest(IncludeOmitTestsMixin, CoverageTest): # https://github.com/nedbat/coveragepy/issues/218 # Used to be if you omitted something executed and inside the source, # then after it was executed but not recorded, it would be found in - # the search for unexecuted files, and given a score of 0%. + # the search for un-executed files, and given a score of 0%. # The omit arg is by path, so need to be in the modules directory. os.chdir("tests_dir_modules") @@ -959,7 +959,7 @@ class SourceIncludeOmitTest(IncludeOmitTestsMixin, CoverageTest): lines = self.coverage_usepkgs(source_pkgs=["pkg1"]) self.filenames_in(lines, "p1a p1b") self.filenames_not_in(lines, "p2a p2b othera otherb osa osb ambiguous") - # Because source= was specified, we do search for unexecuted files. + # Because source= was specified, we do search for un-executed files. assert lines['p1c'] == 0 diff --git a/tests/test_html.py b/tests/test_html.py index 6aea0626..b49cdabb 100644 --- a/tests/test_html.py +++ b/tests/test_html.py @@ -67,7 +67,7 @@ class HtmlTestHelpers(CoverageTest): def get_html_index_content(self): """Return the content of index.html. - Timestamps are replaced with a placeholder so that clocks don't matter. + Time stamps are replaced with a placeholder so that clocks don't matter. """ with open("htmlcov/index.html") as f: @@ -85,17 +85,17 @@ class HtmlTestHelpers(CoverageTest): return index def assert_correct_timestamp(self, html): - """Extract the timestamp from `html`, and assert it is recent.""" + """Extract the time stamp from `html`, and assert it is recent.""" timestamp_pat = r"created at (\d{4})-(\d{2})-(\d{2}) (\d{2}):(\d{2})" m = re.search(timestamp_pat, html) - assert m, "Didn't find a timestamp!" + assert m, "Didn't find a time stamp!" timestamp = datetime.datetime(*map(int, m.groups())) - # The timestamp only records the minute, so the delta could be from + # The time stamp only records the minute, so the delta could be from # 12:00 to 12:01:59, or two minutes. self.assert_recent_datetime( timestamp, seconds=120, - msg=f"Timestamp is wrong: {timestamp}", + msg=f"Time stamp is wrong: {timestamp}", ) def assert_valid_hrefs(self): diff --git a/tests/test_phystokens.py b/tests/test_phystokens.py index da37cead..dae1a0ed 100644 --- a/tests/test_phystokens.py +++ b/tests/test_phystokens.py @@ -32,7 +32,7 @@ SIMPLE_TOKENS = [ ('ws', ' '), ('num', '2'), ('op', ')')], ] -# Mixed-whitespace program, and its token stream. +# Mixed-white-space program, and its token stream. MIXED_WS = """\ def hello(): a="Hello world!" |
