Skip to content

Commit b796eb0

Browse files
committed
test(cancel,ls,man): remove redundant "return"
pytest.skip cancels the execution of the current test, so "return" and subsequent codes arex unreachable. We do not need to explicitly call "return" in this context. scop#1357 (comment)
1 parent 7232d4a commit b796eb0

File tree

3 files changed

+3
-3
lines changed

3 files changed

+3
-3
lines changed

test/t/test_cancel.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ def added_job(self, request, bash):
1616
)
1717
except AssertionError:
1818
pytest.skip("Could not add test print job")
19-
return
19+
2020
if len(got) > 3:
2121
request.addfinalizer(
2222
lambda: assert_bash_exec(bash, "cancel %s" % got[3])

test/t/test_ls.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def test_3(self, bash):
3333
part_full = find_unique_completion_pair(res)
3434
if not part_full:
3535
pytest.skip("No suitable test user found")
36-
return
36+
3737
part, full = part_full
3838
completion = assert_complete(bash, "ls ~%s" % part)
3939
assert completion == full[len(part) :]

test/t/test_man.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ def colonpath(self, request, bash):
2323
pass
2424
else:
2525
pytest.skip("Cygwin doesn't like paths with colons")
26-
return
26+
2727
tmpdir, _, _ = prepare_fixture_dir(
2828
request,
2929
files=["man/man3/Bash::Completion.3pm.gz"],

0 commit comments

Comments
 (0)