Skip to content

Commit 559cf7b

Browse files
yedayakakinomyoga
andauthored
test(realcommand): Don't use pytest.skipif (#1285)
This function doesn't actually exist. Also added an error message, this really should never happen. Co-authored-by: Koichi Murase <[email protected]>
1 parent e112096 commit 559cf7b

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

test/t/unit/test_unit_realcommand.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -43,11 +43,11 @@ def test_basename(self, bash, functions):
4343

4444
def test_basename_nonexistent(self, bash, functions):
4545
filename = "non-existent-file-for-bash-completion-tests"
46-
skipif = "! type -P %s" % filename
46+
file_exists_check = "! type -P %s" % filename
4747
try:
48-
assert_bash_exec(bash, skipif, want_output=None)
48+
assert_bash_exec(bash, file_exists_check, want_output=None)
4949
except AssertionError:
50-
pytest.skipif(skipif)
50+
pytest.skip(f"Found command that shouldn't exist: '{filename}'")
5151
output = assert_bash_exec(
5252
bash,
5353
"! __tester %s" % filename,

0 commit comments

Comments
 (0)