diff options
| author | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-07 21:25:42 -0500 |
|---|---|---|
| committer | Ned Batchelder <ned@nedbatchelder.com> | 2023-01-07 21:25:42 -0500 |
| commit | 13218037401dc30f05fd3a16a2cd52ee882fd1c4 (patch) | |
| tree | c58e4361b3bc81c15196255e3c3a90cb10aa2b04 /tests/test_setup.py | |
| parent | 2c527825ac0cf394b32d773fd0ca5375dd8c031b (diff) | |
| download | python-coveragepy-git-13218037401dc30f05fd3a16a2cd52ee882fd1c4.tar.gz | |
mypy: test_parser.py test_phystokens.py test_process.py test_report.py test_results.py test_setup.py
Diffstat (limited to 'tests/test_setup.py')
| -rw-r--r-- | tests/test_setup.py | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/tests/test_setup.py b/tests/test_setup.py index 5468e3bf..a7a97d1f 100644 --- a/tests/test_setup.py +++ b/tests/test_setup.py @@ -3,8 +3,12 @@ """Tests of miscellaneous stuff.""" +from __future__ import annotations + import sys +from typing import List, cast + import coverage from tests.coveragetest import CoverageTest @@ -15,12 +19,12 @@ class SetupPyTest(CoverageTest): run_in_temp_dir = False - def setUp(self): + def setUp(self) -> None: super().setUp() # Force the most restrictive interpretation. self.set_environ('LC_ALL', 'C') - def test_metadata(self): + def test_metadata(self) -> None: status, output = self.run_command_status( "python setup.py --description --version --url --author" ) @@ -31,19 +35,19 @@ class SetupPyTest(CoverageTest): assert "github.com/nedbat/coveragepy" in out[2] assert "Ned Batchelder" in out[3] - def test_more_metadata(self): + def test_more_metadata(self) -> None: # Let's be sure we pick up our own setup.py # CoverageTest restores the original sys.path for us. sys.path.insert(0, '') from setup import setup_args - classifiers = setup_args['classifiers'] + classifiers = cast(List[str], setup_args['classifiers']) assert len(classifiers) > 7 assert classifiers[-1].startswith("Development Status ::") assert "Programming Language :: Python :: %d" % sys.version_info[:1] in classifiers assert "Programming Language :: Python :: %d.%d" % sys.version_info[:2] in classifiers - long_description = setup_args['long_description'].splitlines() + long_description = cast(str, setup_args['long_description']).splitlines() assert len(long_description) > 7 assert long_description[0].strip() != "" assert long_description[-1].strip() != "" |
