aboutsummaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
authorArthur Zamarin <arthurzam@gentoo.org>2024-01-26 10:36:11 +0200
committerArthur Zamarin <arthurzam@gentoo.org>2024-01-26 10:36:11 +0200
commitfb4dc9bbf2b51732aa4a254d8ba18c0235f8d70c (patch)
treeb9e286bcf83dd0e55d4e0a819c1f4f4d72b320a9 /tests
parentstart work on 0.10.28 (diff)
downloadpkgcheck-fb4dc9bbf2b51732aa4a254d8ba18c0235f8d70c.tar.gz
pkgcheck-fb4dc9bbf2b51732aa4a254d8ba18c0235f8d70c.tar.bz2
pkgcheck-fb4dc9bbf2b51732aa4a254d8ba18c0235f8d70c.zip
reformat with black 24
Signed-off-by: Arthur Zamarin <arthurzam@gentoo.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/scripts/test_pkgcheck_cache.py10
-rw-r--r--tests/scripts/test_pkgcheck_replay.py9
2 files changed, 12 insertions, 7 deletions
diff --git a/tests/scripts/test_pkgcheck_cache.py b/tests/scripts/test_pkgcheck_cache.py
index 3d9ad139..09c75028 100644
--- a/tests/scripts/test_pkgcheck_cache.py
+++ b/tests/scripts/test_pkgcheck_cache.py
@@ -43,8 +43,9 @@ class TestPkgcheckCache:
# fail to remove it
for arg in ("-R", "--remove"):
- with patch("pkgcheck.addons.caches.os.unlink") as unlink, patch(
- "sys.argv", self.args + [arg] + ["-t", "profiles"]
+ with (
+ patch("pkgcheck.addons.caches.os.unlink") as unlink,
+ patch("sys.argv", self.args + [arg] + ["-t", "profiles"]),
):
unlink.side_effect = IOError("bad perms")
with pytest.raises(SystemExit) as excinfo:
@@ -76,8 +77,9 @@ class TestPkgcheckCache:
self.script()
# fail to forcibly remove all
- with patch("pkgcheck.addons.caches.shutil.rmtree") as rmtree, patch(
- "sys.argv", self.args + ["-Rf"]
+ with (
+ patch("pkgcheck.addons.caches.shutil.rmtree") as rmtree,
+ patch("sys.argv", self.args + ["-Rf"]),
):
rmtree.side_effect = IOError("bad perms")
with pytest.raises(SystemExit) as excinfo:
diff --git a/tests/scripts/test_pkgcheck_replay.py b/tests/scripts/test_pkgcheck_replay.py
index b6b7d606..0fe32a22 100644
--- a/tests/scripts/test_pkgcheck_replay.py
+++ b/tests/scripts/test_pkgcheck_replay.py
@@ -76,9 +76,12 @@ class TestPkgcheckReplay:
reporter.report(ProfileWarning("profile warning: foo"))
file.seek(0)
- with open(file.name) as stdin, patch("sys.stdin", stdin), patch(
- "sys.argv", [*self.args, "-R", "StrReporter", "-"]
- ), pytest.raises(SystemExit) as excinfo:
+ with (
+ open(file.name) as stdin,
+ patch("sys.stdin", stdin),
+ patch("sys.argv", [*self.args, "-R", "StrReporter", "-"]),
+ pytest.raises(SystemExit) as excinfo,
+ ):
self.script()
out, err = capsys.readouterr()
assert not err