From fb770f4d748a5c334efa3ef251ff4f1524ac0c90 Mon Sep 17 00:00:00 2001 From: Stephen Rosen Date: Fri, 18 Mar 2022 05:16:19 +0000 Subject: [PATCH] Remove install_requires dependency on 'coverage' This can be traced back to an added dependency on code-cov (prior to coverage) which doesn't appear to have been correct. It was added to the installation requirements rather than the dev requirements. It should be possible to use ``nose2`` in an environment without ``coverage`` installed (but not to use the coverage plugin). As a result, `install_requires` can be removed entirely. --- nose2/tests/functional/test_coverage.py | 7 +++++++ setup.py | 8 ++------ 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/nose2/tests/functional/test_coverage.py b/nose2/tests/functional/test_coverage.py --- a/nose2/tests/functional/test_coverage.py 2022-02-06 01:33:12.000000000 +0800 +++ b/nose2/tests/functional/test_coverage.py 2022-10-27 10:25:37.504095410 +0800 @@ -8,6 +8,13 @@ class TestCoverage(FunctionalTestCase): + def setUp(self): + super(TestCoverage, self).setUp() + try: + import coverage # noqa: F401 + except ImportError: + self.skipTest("coverage required") + def assertProcOutputPattern( self, proc, libname, stats, total_stats=None, assert_exit_status=0 ): diff --git a/setup.py b/setup.py --- a/setup.py 2022-02-13 08:24:36.000000000 +0800 +++ b/setup.py 2022-10-27 10:27:35.122002941 +0800 @@ -25,15 +25,13 @@ ], install_requires=[ "six>=1.7", - "coverage>=4.4.1", ], extras_require={ - "coverage_plugin": ["coverage>=4.4.1"], + "coverage_plugin": ["coverage"], "dev": [ - "Sphinx>=1.6.5", + "Sphinx", "sphinx_rtd_theme", "mock", - "coverage", "sphinx-issues", ], },