Skip to content

Commit a10f2ab

Browse files
committed
style(test): reformat with ruff
1 parent e2652b6 commit a10f2ab

File tree

4 files changed

+21
-17
lines changed

4 files changed

+21
-17
lines changed

test/t/conftest.py

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -426,20 +426,22 @@ def assert_bash_exec(
426426
)
427427
if want_output is not None:
428428
if output:
429-
assert (
430-
want_output
431-
), 'Unexpected output from "%s": exit status=%s, output="%s"' % (
432-
cmd,
433-
status,
434-
output,
429+
assert want_output, (
430+
'Unexpected output from "%s": exit status=%s, output="%s"'
431+
% (
432+
cmd,
433+
status,
434+
output,
435+
)
435436
)
436437
else:
437-
assert (
438-
not want_output
439-
), 'Expected output from "%s": exit status=%s, output="%s"' % (
440-
cmd,
441-
status,
442-
output,
438+
assert not want_output, (
439+
'Expected output from "%s": exit status=%s, output="%s"'
440+
% (
441+
cmd,
442+
status,
443+
output,
444+
)
443445
)
444446

445447
return output

test/t/test_installpkg.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,8 @@ def test_1(self, completion):
1212
@pytest.mark.complete("installpkg --")
1313
def test_2(self, completion):
1414
assert (
15-
completion == "--ask --infobox --md5sum --menu "
15+
completion
16+
== "--ask --infobox --md5sum --menu "
1617
"--priority --root --tagfile --terse --warn".split()
1718
)
1819

test/t/test_upgradepkg.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,8 @@ def test_1(self, completion):
1212
@pytest.mark.complete("upgradepkg --")
1313
def test_2(self, completion):
1414
assert (
15-
completion == "--dry-run --install-new --reinstall "
16-
"--verbose".split()
15+
completion
16+
== "--dry-run --install-new --reinstall --verbose".split()
1717
)
1818

1919
@pytest.mark.complete("upgradepkg ", cwd="slackware/home")

test/t/test_xz.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,9 @@ def test_1(self, completion):
99
@pytest.mark.complete("xz -d xz/")
1010
def test_2(self, completion):
1111
assert (
12-
completion == "a/ bashcomp.lzma bashcomp.tar.xz "
13-
"bashcomp.tlz bashcomp.xz".split()
12+
completion
13+
== "a/ bashcomp.lzma bashcomp.tar.xz bashcomp.tlz "
14+
"bashcomp.xz".split()
1415
)
1516

1617
@pytest.mark.complete("xz xz/")

0 commit comments

Comments
 (0)