aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/config/test_central.py1
-rw-r--r--tests/ebuild/test_domain.py7
-rw-r--r--tests/ebuild/test_eapi.py13
-rw-r--r--tests/ebuild/test_profiles.py3
-rw-r--r--tests/restrictions/test_restriction.py1
-rw-r--r--tests/restrictions/test_values.py1
6 files changed, 12 insertions, 14 deletions
diff --git a/tests/config/test_central.py b/tests/config/test_central.py
index 55b541f8f..c7572f56e 100644
--- a/tests/config/test_central.py
+++ b/tests/config/test_central.py
@@ -27,7 +27,6 @@ def drawer(content=None, contents=None):
class RemoteSource:
-
"""Use this one for tests that do need the names but nothing more."""
def __iter__(self):
diff --git a/tests/ebuild/test_domain.py b/tests/ebuild/test_domain.py
index 54aa8f36b..329305b23 100644
--- a/tests/ebuild/test_domain.py
+++ b/tests/ebuild/test_domain.py
@@ -47,9 +47,10 @@ class TestDomain:
def rev_iter_scan(*args, **kwargs):
return iter(sorted(orig_func(*args, **kwargs), reverse=True))
- with mock.patch(
- "pkgcore.fs.livefs.iter_scan", side_effect=rev_iter_scan
- ), mock.patch("pkgcore.ebuild.domain.iter_scan", side_effect=rev_iter_scan):
+ with (
+ mock.patch("pkgcore.fs.livefs.iter_scan", side_effect=rev_iter_scan),
+ mock.patch("pkgcore.ebuild.domain.iter_scan", side_effect=rev_iter_scan),
+ ):
assert (
(packages.AlwaysTrue, ((), ("X",))),
(packages.AlwaysTrue, (("X",), ("Y",))),
diff --git a/tests/ebuild/test_eapi.py b/tests/ebuild/test_eapi.py
index cf7ef0906..2b39e68a4 100644
--- a/tests/ebuild/test_eapi.py
+++ b/tests/ebuild/test_eapi.py
@@ -26,10 +26,10 @@ class TestEAPI:
EAPI.register(magic="0")
mock_ebd_temp = str(shutil.copytree(EBD_PATH, tmp_path / "ebd"))
- with mock.patch(
- "pkgcore.ebuild.eapi.bash_version"
- ) as bash_version, mock.patch.dict(eapi.EAPI.known_eapis), mock.patch(
- "pkgcore.ebuild.eapi.const.EBD_PATH", mock_ebd_temp
+ with (
+ mock.patch("pkgcore.ebuild.eapi.bash_version") as bash_version,
+ mock.patch.dict(eapi.EAPI.known_eapis),
+ mock.patch("pkgcore.ebuild.eapi.const.EBD_PATH", mock_ebd_temp),
):
# inadequate bash version
bash_version.return_value = "3.1"
@@ -52,8 +52,9 @@ class TestEAPI:
assert eapi6.is_supported
mock_ebd_temp = str(shutil.copytree(EBD_PATH, tmp_path / "ebd"))
- with mock.patch.dict(eapi.EAPI.known_eapis), mock.patch(
- "pkgcore.ebuild.eapi.const.EBD_PATH", mock_ebd_temp
+ with (
+ mock.patch.dict(eapi.EAPI.known_eapis),
+ mock.patch("pkgcore.ebuild.eapi.const.EBD_PATH", mock_ebd_temp),
):
# partially supported EAPI is flagged as such
test_eapi = EAPI.register("test", optionals={"is_supported": False})
diff --git a/tests/ebuild/test_profiles.py b/tests/ebuild/test_profiles.py
index 31549d5de..47fcf8b59 100644
--- a/tests/ebuild/test_profiles.py
+++ b/tests/ebuild/test_profiles.py
@@ -95,8 +95,7 @@ class TestPmsProfileNode(profile_mixin):
klass = staticmethod(ProfileNode)
profile = "default"
- def setup_repo(self, tmp_path):
- ...
+ def setup_repo(self, tmp_path): ...
@pytest.fixture(autouse=True)
def _setup(self, tmp_path):
diff --git a/tests/restrictions/test_restriction.py b/tests/restrictions/test_restriction.py
index b1f8a5d89..37a26be83 100644
--- a/tests/restrictions/test_restriction.py
+++ b/tests/restrictions/test_restriction.py
@@ -71,7 +71,6 @@ class TestAlwaysBool(TestRestriction):
class NoneMatch(restriction.base):
-
"""Only matches None."""
__slots__ = ()
diff --git a/tests/restrictions/test_values.py b/tests/restrictions/test_values.py
index 4365fda0a..40450c427 100644
--- a/tests/restrictions/test_values.py
+++ b/tests/restrictions/test_values.py
@@ -24,7 +24,6 @@ class TestBase(TestRestriction):
class TestGetAttr(TestRestriction):
-
"""Test bits of GetAttrRestriction that differ from PackageRestriction."""
def test_force(self):