diff options
author | 2022-11-24 20:18:38 +0100 | |
---|---|---|
committer | 2022-11-26 12:37:38 +0100 | |
commit | 7485d43076c062e4eb637bcf2bcc10ed5623ef4a (patch) | |
tree | 7506fa7ce43c8fa47f18fa0b6a19a4a763d86c1a /tests | |
parent | PythonCheck: replace obsolete 2_7 target with 3_5 in tests (diff) | |
download | pkgcheck-7485d43076c062e4eb637bcf2bcc10ed5623ef4a.tar.gz pkgcheck-7485d43076c062e4eb637bcf2bcc10ed5623ef4a.tar.bz2 pkgcheck-7485d43076c062e4eb637bcf2bcc10ed5623ef4a.zip |
PythonCheck: stop warning about eclass use on python:2.7 deps
The python2_7 target support are phased out from the eclass, so stop
warning about direct dependencies.
Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r-- | tests/checks/test_python.py | 24 |
1 files changed, 8 insertions, 16 deletions
diff --git a/tests/checks/test_python.py b/tests/checks/test_python.py index ec48a378..843975b5 100644 --- a/tests/checks/test_python.py +++ b/tests/checks/test_python.py @@ -29,9 +29,7 @@ class TestPythonCheck(misc.ReportTestCase): assert isinstance(r, python.MissingPythonEclass) assert 'missing python-any-r1 eclass usage for DEPEND="dev-lang/python"' in str(r) - assert isinstance( - self.assertReport(self.check, self.mk_pkg(DEPEND='dev-lang/python:2.7')), - python.MissingPythonEclass) + self.assertNoReport(self.check, self.mk_pkg(DEPEND='dev-lang/python:2.7')) assert isinstance( self.assertReport(self.check, self.mk_pkg(DEPEND='dev-lang/python:*')), python.MissingPythonEclass) @@ -53,9 +51,7 @@ class TestPythonCheck(misc.ReportTestCase): assert isinstance( self.assertReport(self.check, self.mk_pkg(BDEPEND='dev-lang/python')), python.MissingPythonEclass) - assert isinstance( - self.assertReport(self.check, self.mk_pkg(BDEPEND='dev-lang/python:2.7')), - python.MissingPythonEclass) + self.assertNoReport(self.check, self.mk_pkg(BDEPEND='dev-lang/python:2.7')) assert isinstance( self.assertReport(self.check, self.mk_pkg(BDEPEND='dev-lang/python:*')), python.MissingPythonEclass) @@ -71,19 +67,17 @@ class TestPythonCheck(misc.ReportTestCase): def test_missing_eclass_rdepend(self): self.assertNoReport( self.check, - self.mk_pkg(_eclasses_=['python-r1'], RDEPEND='dev-lang/python:2.7')) + self.mk_pkg(_eclasses_=['python-r1'], RDEPEND='dev-lang/python:3.7')) self.assertNoReport( self.check, - self.mk_pkg(_eclasses_=['python-single-r1'], RDEPEND='dev-lang/python:2.7')) + self.mk_pkg(_eclasses_=['python-single-r1'], RDEPEND='dev-lang/python:3.7')) self.assertNoReport(self.check, self.mk_pkg(RDEPEND='dev-foo/frobnicate')) r = self.assertReport(self.check, self.mk_pkg(RDEPEND='dev-lang/python')) assert isinstance(r, python.MissingPythonEclass) assert 'missing python-r1 or python-single-r1 eclass' in str(r) - assert isinstance( - self.assertReport(self.check, self.mk_pkg(RDEPEND='dev-lang/python:2.7')), - python.MissingPythonEclass) + self.assertNoReport(self.check, self.mk_pkg(RDEPEND='dev-lang/python:2.7')) assert isinstance( self.assertReport(self.check, self.mk_pkg(RDEPEND='dev-lang/python:=')), python.MissingPythonEclass) @@ -99,18 +93,16 @@ class TestPythonCheck(misc.ReportTestCase): def test_missing_eclass_pdepend(self): self.assertNoReport( self.check, - self.mk_pkg(_eclasses_=['python-r1'], PDEPEND='dev-lang/python:2.7')) + self.mk_pkg(_eclasses_=['python-r1'], PDEPEND='dev-lang/python:3.7')) self.assertNoReport( self.check, - self.mk_pkg(_eclasses_=['python-single-r1'], PDEPEND='dev-lang/python:2.7')) + self.mk_pkg(_eclasses_=['python-single-r1'], PDEPEND='dev-lang/python:3.7')) self.assertNoReport(self.check, self.mk_pkg(PDEPEND='dev-foo/frobnicate')) assert isinstance( self.assertReport(self.check, self.mk_pkg(PDEPEND='dev-lang/python')), python.MissingPythonEclass) - assert isinstance( - self.assertReport(self.check, self.mk_pkg(PDEPEND='dev-lang/python:2.7')), - python.MissingPythonEclass) + self.assertNoReport(self.check, self.mk_pkg(PDEPEND='dev-lang/python:2.7')) assert isinstance( self.assertReport(self.check, self.mk_pkg(PDEPEND='dev-lang/python:=')), python.MissingPythonEclass) |