diff options
25 files changed, 1 insertions, 59 deletions
diff --git a/src/pkgcheck/bash/__init__.py b/src/pkgcheck/bash/__init__.py index 38f9424d..bff1a94d 100644 --- a/src/pkgcheck/bash/__init__.py +++ b/src/pkgcheck/bash/__init__.py @@ -16,6 +16,7 @@ syslib = find_library("tree-sitter-bash") # path to bash parsing library (vendored) lib = pjoin(os.path.dirname(__file__), "lang.so") + # copied from tree-sitter with the following changes: # - prefer stdc++ over c++ when linking # - perform platform-specific compiler customizations diff --git a/tests/addons/test_addons.py b/tests/addons/test_addons.py index 87c59359..47503a6c 100644 --- a/tests/addons/test_addons.py +++ b/tests/addons/test_addons.py @@ -169,7 +169,6 @@ class Test_profile_data: class TestProfileAddon: - addon_kls = addons.profiles.ProfileAddon @pytest.fixture(autouse=True) diff --git a/tests/checks/test_acct.py b/tests/checks/test_acct.py index 4c8202dc..a1640dad 100644 --- a/tests/checks/test_acct.py +++ b/tests/checks/test_acct.py @@ -9,7 +9,6 @@ from .. import misc class TestAcctUser(misc.ReportTestCase): - check_kls = acct.AcctCheck kind = "user" diff --git a/tests/checks/test_cleanup.py b/tests/checks/test_cleanup.py index 7ca2f3b6..956d6e2a 100644 --- a/tests/checks/test_cleanup.py +++ b/tests/checks/test_cleanup.py @@ -11,7 +11,6 @@ def mk_pkg(ver, keywords=("x86", "amd64"), slot="0", **kwds): class TestRedundantVersion(misc.ReportTestCase): - check_kls = cleanup.RedundantVersionCheck check = check_kls(arghparse.Namespace(stable_only=True), profile_addon={}) @@ -61,7 +60,6 @@ class TestRedundantVersion(misc.ReportTestCase): class TestRedundantVersionByStable(misc.ReportTestCase): - check_kls = cleanup.RedundantVersionCheck check = cleanup.RedundantVersionCheck(arghparse.Namespace(stable_only=True), profile_addon={}) diff --git a/tests/checks/test_codingstyle.py b/tests/checks/test_codingstyle.py index 528faa8b..b6de0c12 100644 --- a/tests/checks/test_codingstyle.py +++ b/tests/checks/test_codingstyle.py @@ -9,7 +9,6 @@ from .. import misc class TestInsintoCheck(misc.ReportTestCase): - check_kls = codingstyle.InsintoCheck def test_insinto(self): @@ -60,7 +59,6 @@ class TestInsintoCheck(misc.ReportTestCase): class TestAbsoluteSymlink(misc.ReportTestCase): - check_kls = codingstyle.AbsoluteSymlinkCheck def test_it(self): @@ -108,7 +106,6 @@ class TestAbsoluteSymlink(misc.ReportTestCase): class TestPathVariablesCheck(misc.ReportTestCase): - check_kls = codingstyle.PathVariablesCheck check = check_kls(None) @@ -222,7 +219,6 @@ class TestPathVariablesCheck(misc.ReportTestCase): class TestObsoleteUri(misc.ReportTestCase): - check_kls = codingstyle.ObsoleteUriCheck def test_github_archive_uri(self): @@ -300,7 +296,6 @@ class TestObsoleteUri(misc.ReportTestCase): class TestBetterCompression(misc.ReportTestCase): - check_kls = codingstyle.BetterCompressionCheck def test_github_archive_uri(self): @@ -341,7 +336,6 @@ class TestBetterCompression(misc.ReportTestCase): class TestStaticSrcUri(misc.ReportTestCase): - check_kls = codingstyle.MetadataVarCheck check = check_kls(None) @@ -428,7 +422,6 @@ class TestStaticSrcUri(misc.ReportTestCase): class TestExcessiveLineLength(misc.ReportTestCase): - check_kls = codingstyle.LineLengthCheck check = check_kls(None) word_length = codingstyle.ExcessiveLineLength.word_length diff --git a/tests/checks/test_dropped_keywords.py b/tests/checks/test_dropped_keywords.py index fbfee5fc..5e2e249b 100644 --- a/tests/checks/test_dropped_keywords.py +++ b/tests/checks/test_dropped_keywords.py @@ -5,7 +5,6 @@ from .. import misc class TestDroppedKeywords(misc.ReportTestCase): - check_kls = dropped_keywords.DroppedKeywordsCheck def mk_pkg(self, ver, keywords="", eclasses=(), **kwargs): diff --git a/tests/checks/test_git.py b/tests/checks/test_git.py index eed40e13..57fc28ac 100644 --- a/tests/checks/test_git.py +++ b/tests/checks/test_git.py @@ -247,7 +247,6 @@ class TestGitCommitMessageCheck(ReportTestCase): class TestGitCommitMessageRepoCheck(ReportTestCase): - check_kls = git_mod.GitCommitMessageCheck @pytest.fixture(autouse=True) @@ -384,7 +383,6 @@ class TestGitCommitMessageRepoCheck(ReportTestCase): class TestGitPkgCommitsCheck(ReportTestCase): - check_kls = git_mod.GitPkgCommitsCheck @pytest.fixture(autouse=True) @@ -711,7 +709,6 @@ class TestGitPkgCommitsCheck(ReportTestCase): class TestGitEclassCommitsCheck(ReportTestCase): - check_kls = git_mod.GitEclassCommitsCheck @pytest.fixture(autouse=True) diff --git a/tests/checks/test_glsa.py b/tests/checks/test_glsa.py index bec35857..7898ac27 100644 --- a/tests/checks/test_glsa.py +++ b/tests/checks/test_glsa.py @@ -25,7 +25,6 @@ def check(tmp_path): class TestVulnerabilitiesCheck(misc.ReportTestCase): - check_kls = glsa.GlsaCheck def test_no_glsa_dir(self, tmp_path): diff --git a/tests/checks/test_header.py b/tests/checks/test_header.py index e79fdeb1..c029d16b 100644 --- a/tests/checks/test_header.py +++ b/tests/checks/test_header.py @@ -5,7 +5,6 @@ from .. import misc class TestEbuildHeaderCheck(misc.ReportTestCase): - check_kls = header.EbuildHeaderCheck def mk_check(self): diff --git a/tests/checks/test_imlate.py b/tests/checks/test_imlate.py index 624dc90a..26920f39 100644 --- a/tests/checks/test_imlate.py +++ b/tests/checks/test_imlate.py @@ -26,7 +26,6 @@ def mk_pkg(ver, keywords="", slot="0"): class TestImlateCheck(misc.ReportTestCase): - check_kls = imlate.ImlateCheck def test_all_unstable(self): diff --git a/tests/checks/test_metadata.py b/tests/checks/test_metadata.py index ee0ac08e..77c062c6 100644 --- a/tests/checks/test_metadata.py +++ b/tests/checks/test_metadata.py @@ -19,7 +19,6 @@ from .. import misc class TestDescriptionCheck(misc.ReportTestCase): - check_kls = metadata.DescriptionCheck check = metadata.DescriptionCheck(None) @@ -51,7 +50,6 @@ class TestDescriptionCheck(misc.ReportTestCase): class TestHomepageCheck(misc.ReportTestCase): - check_kls = metadata.HomepageCheck check = metadata.HomepageCheck(None) @@ -129,7 +127,6 @@ class IUSE_Options(misc.Tmpdir): class TestKeywordsCheck(IUSE_Options, misc.ReportTestCase): - check_kls = metadata.KeywordsCheck @pytest.fixture @@ -289,7 +286,6 @@ class TestKeywordsCheck(IUSE_Options, misc.ReportTestCase): class TestIuseCheck(IUSE_Options, misc.ReportTestCase): - check_kls = metadata.IuseCheck @pytest.fixture @@ -326,7 +322,6 @@ class TestIuseCheck(IUSE_Options, misc.ReportTestCase): class TestEapiCheck(misc.ReportTestCase, misc.Tmpdir): - check_kls = metadata.EapiCheck def mk_check(self, deprecated=(), banned=()): @@ -385,7 +380,6 @@ class TestEapiCheck(misc.ReportTestCase, misc.Tmpdir): class TestSourcingCheck(misc.ReportTestCase, misc.Tmpdir): - check_kls = metadata.SourcingCheck _repo_id = 0 @@ -456,7 +450,6 @@ class TestSourcingCheck(misc.ReportTestCase, misc.Tmpdir): class TestRequiredUseCheck(IUSE_Options, misc.ReportTestCase): - check_kls = metadata.RequiredUseCheck @pytest.fixture @@ -685,24 +678,20 @@ class _TestRestrictPropertiesCheck(use_based(), misc.ReportTestCase): class TestRestrictCheck(_TestRestrictPropertiesCheck): - check_kls = metadata.RestrictCheck class TestPropertiesCheck(_TestRestrictPropertiesCheck): - check_kls = metadata.PropertiesCheck class _TestRestrictPropertiesCheck(use_based(), misc.ReportTestCase): - check_kls = metadata.RestrictCheck attr = None unknown_result_cls = None class TestRestrictTestCheck(misc.ReportTestCase): - check_kls = metadata.RestrictTestCheck check = metadata.RestrictTestCheck(None) @@ -741,7 +730,6 @@ class TestRestrictTestCheck(misc.ReportTestCase): class TestLicenseCheck(use_based(), misc.ReportTestCase): - check_kls = metadata.LicenseCheck def mk_check(self, licenses=(), **kwargs): @@ -813,7 +801,6 @@ class TestLicenseCheck(use_based(), misc.ReportTestCase): class TestMissingSlotDepCheck(use_based(), misc.ReportTestCase): - check_kls = metadata.MissingSlotDepCheck def mk_check(self, pkgs=None, **kwargs): @@ -874,7 +861,6 @@ class TestMissingSlotDepCheck(use_based(), misc.ReportTestCase): class TestDependencyCheck(use_based(), misc.ReportTestCase): - check_kls = metadata.DependencyCheck def mk_pkg(self, attr, depset="", eapi="0", iuse=""): @@ -1034,7 +1020,6 @@ class TestDependencyCheck(use_based(), misc.ReportTestCase): class TestOutdatedBlockersCheck(misc.ReportTestCase): - check_kls = metadata.OutdatedBlockersCheck @pytest.fixture(autouse=True) @@ -1117,7 +1102,6 @@ class TestOutdatedBlockersCheck(misc.ReportTestCase): class TestSrcUriCheck(use_based(), misc.ReportTestCase): - check_kls = metadata.SrcUriCheck def mk_pkg( @@ -1313,7 +1297,6 @@ class TestSrcUriCheck(use_based(), misc.ReportTestCase): class TestMissingUnpackerDepCheck(use_based(), misc.ReportTestCase): - check_kls = metadata.MissingUnpackerDepCheck def mk_pkg(self, exts, eapi="7", **data): diff --git a/tests/checks/test_network.py b/tests/checks/test_network.py index fb684954..818b3b1b 100644 --- a/tests/checks/test_network.py +++ b/tests/checks/test_network.py @@ -19,7 +19,6 @@ requests = pytest.importorskip("requests") class TestNetworkChecks: - repos_data = pytest.REPO_ROOT / "testdata/data/repos" repos_dir = pytest.REPO_ROOT / "testdata/repos" diff --git a/tests/checks/test_perl.py b/tests/checks/test_perl.py index 1b26e412..8de1a795 100644 --- a/tests/checks/test_perl.py +++ b/tests/checks/test_perl.py @@ -22,7 +22,6 @@ def perl_deps_missing(): @pytest.mark.skipif(perl_deps_missing(), reason=REASON) class TestPerlCheck(misc.ReportTestCase): - check_kls = perl.PerlCheck def mk_check(self, verbosity=0): diff --git a/tests/checks/test_pkgdir.py b/tests/checks/test_pkgdir.py index 2a26e79c..df104f49 100644 --- a/tests/checks/test_pkgdir.py +++ b/tests/checks/test_pkgdir.py @@ -412,7 +412,6 @@ class TestUnknownPkgDirEntry(PkgDirCheckBase): class TestLiveOnlyCheck(misc.ReportTestCase): - check_kls = pkgdir.LiveOnlyCheck @pytest.fixture(autouse=True) diff --git a/tests/checks/test_python.py b/tests/checks/test_python.py index eb4c44fb..268c4d4d 100644 --- a/tests/checks/test_python.py +++ b/tests/checks/test_python.py @@ -4,7 +4,6 @@ from .. import misc class TestPythonCheck(misc.ReportTestCase): - check = python.PythonCheck(None) check_kls = python.PythonCheck diff --git a/tests/checks/test_repo.py b/tests/checks/test_repo.py index 4220e055..536dfc0f 100644 --- a/tests/checks/test_repo.py +++ b/tests/checks/test_repo.py @@ -13,7 +13,6 @@ from .. import misc class TestRepoDirCheck(misc.Tmpdir, misc.ReportTestCase): - check_kls = repo.RepoDirCheck def mk_check(self): diff --git a/tests/checks/test_repo_metadata.py b/tests/checks/test_repo_metadata.py index ff550d7d..47d42d42 100644 --- a/tests/checks/test_repo_metadata.py +++ b/tests/checks/test_repo_metadata.py @@ -10,7 +10,6 @@ from .. import misc class TestPackageUpdatesCheck(misc.Tmpdir, misc.ReportTestCase): - check_kls = repo_metadata.PackageUpdatesCheck def mk_check(self, pkgs=(), **kwargs): diff --git a/tests/checks/test_stablereq.py b/tests/checks/test_stablereq.py index 2e181e57..43f4380b 100644 --- a/tests/checks/test_stablereq.py +++ b/tests/checks/test_stablereq.py @@ -11,7 +11,6 @@ from ..misc import ReportTestCase, init_check class TestStableRequestCheck(ReportTestCase): - check_kls = StableRequestCheck @pytest.fixture(autouse=True) diff --git a/tests/misc.py b/tests/misc.py index 92d25721..406be340 100644 --- a/tests/misc.py +++ b/tests/misc.py @@ -66,7 +66,6 @@ class FakePkg(package): class FakeTimedPkg(package): - __slots__ = "_mtime_" def __init__(self, cpvstr, mtime, data=None, shared=None, repo=None): @@ -79,7 +78,6 @@ class FakeTimedPkg(package): class FakeFilesDirPkg(package): - __slots__ = ("path",) def __init__(self, cpvstr, repo, data=None, shared=None): diff --git a/tests/scripts/test_pkgcheck.py b/tests/scripts/test_pkgcheck.py index 49e2f8b6..21b52424 100644 --- a/tests/scripts/test_pkgcheck.py +++ b/tests/scripts/test_pkgcheck.py @@ -40,7 +40,6 @@ def test_script_run(capsys): class TestPkgcheck: - script = partial(run, project) def test_version(self, capsys): diff --git a/tests/scripts/test_pkgcheck_cache.py b/tests/scripts/test_pkgcheck_cache.py index 023a3161..3d9ad139 100644 --- a/tests/scripts/test_pkgcheck_cache.py +++ b/tests/scripts/test_pkgcheck_cache.py @@ -8,7 +8,6 @@ from pkgcheck.scripts import run class TestPkgcheckCache: - script = partial(run, project) @pytest.fixture(autouse=True) diff --git a/tests/scripts/test_pkgcheck_ci.py b/tests/scripts/test_pkgcheck_ci.py index bc0d9cbf..6530c0f0 100644 --- a/tests/scripts/test_pkgcheck_ci.py +++ b/tests/scripts/test_pkgcheck_ci.py @@ -9,7 +9,6 @@ from pkgcore.ebuild.cpv import VersionedCPV class TestPkgcheckCi: - script = partial(run, "pkgcheck") @pytest.fixture(autouse=True) diff --git a/tests/scripts/test_pkgcheck_scan.py b/tests/scripts/test_pkgcheck_scan.py index e7b024dd..7b1e5bdc 100644 --- a/tests/scripts/test_pkgcheck_scan.py +++ b/tests/scripts/test_pkgcheck_scan.py @@ -264,7 +264,6 @@ class TestPkgcheckScanParseArgs: ) def test_makeopts_parsing(self, parser, makeopts, expected_jobs): with patch("os.cpu_count", return_value=4), os_environ(MAKEOPTS=makeopts): - options = parser.parse_args(["scan"]) assert options.jobs == expected_jobs assert options.tasks == 5 * expected_jobs @@ -374,7 +373,6 @@ class TestPkgcheckScanParseConfigArgs: class TestPkgcheckScan: - script = staticmethod(partial(run, project)) repos_data = pytest.REPO_ROOT / "testdata/data/repos" diff --git a/tests/scripts/test_pkgcheck_show.py b/tests/scripts/test_pkgcheck_show.py index ee40f7cf..26677059 100644 --- a/tests/scripts/test_pkgcheck_show.py +++ b/tests/scripts/test_pkgcheck_show.py @@ -10,7 +10,6 @@ from pkgcheck.scripts import run class TestPkgcheckShow: - script = partial(run, project) @pytest.fixture(autouse=True) diff --git a/tests/test_reporters.py b/tests/test_reporters.py index 4a0cda39..8ffc93cf 100644 --- a/tests/test_reporters.py +++ b/tests/test_reporters.py @@ -11,7 +11,6 @@ from snakeoil.formatters import PlainTextFormatter class BaseReporter: - reporter_cls = reporters.Reporter @pytest.fixture(autouse=True) @@ -47,7 +46,6 @@ class BaseReporter: class TestStrReporter(BaseReporter): - reporter_cls = reporters.StrReporter add_report_output = dedent( """\ @@ -63,7 +61,6 @@ class TestStrReporter(BaseReporter): class TestFancyReporter(BaseReporter): - reporter_cls = reporters.FancyReporter add_report_output = dedent( """\ @@ -86,7 +83,6 @@ class TestFancyReporter(BaseReporter): class TestJsonReporter(BaseReporter): - reporter_cls = reporters.JsonReporter add_report_output = dedent( """\ @@ -102,7 +98,6 @@ class TestJsonReporter(BaseReporter): class TestXmlReporter(BaseReporter): - reporter_cls = reporters.XmlReporter add_report_output = dedent( """\ @@ -120,7 +115,6 @@ class TestXmlReporter(BaseReporter): class TestCsvReporter(BaseReporter): - reporter_cls = reporters.CsvReporter add_report_output = dedent( """\ @@ -136,7 +130,6 @@ class TestCsvReporter(BaseReporter): class TestFormatReporter(BaseReporter): - reporter_cls = partial(reporters.FormatReporter, "") def test_add_report(self, capsys): @@ -167,7 +160,6 @@ class TestFormatReporter(BaseReporter): class TestJsonStream(BaseReporter): - reporter_cls = reporters.JsonStream def test_add_report(self, capsys): @@ -202,7 +194,6 @@ class TestJsonStream(BaseReporter): class TestFlycheckReporter(BaseReporter): - reporter_cls = reporters.FlycheckReporter add_report_output = dedent( """\ |