Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
vient committed Oct 31, 2023
1 parent c2ce578 commit 4c5ea87
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion tests/test_local.py
Original file line number Diff line number Diff line change
Expand Up @@ -607,21 +607,25 @@ def test_iter_lines_line_timeout(self):

@skip_on_windows
def test_modifiers(self):
from plumbum.cmd import grep, ls
from plumbum.cmd import cat, grep, ls

f = (ls["-a"] | grep["\\.py"]) & BG
f.wait()
assert "test_local.py" in f.stdout.splitlines()

command = ls["-a"] | grep["local"]
command_false = ls["-a"] | grep["not_a_file_here"]
command_false_2 = command_false | cat
command & FG
assert command & TF
assert not (command_false & TF)
assert not (command_false_2 & TF)
assert command & RETCODE == 0
assert command_false & RETCODE == 1
assert command_false_2 & RETCODE == 1
assert (command & TEE)[0] == 0
assert (command_false & TEE(retcode=None))[0] == 1
assert (command_false_2 & TEE(retcode=None))[0] == 1

@skip_on_windows
def test_tee_modifier(self, capfd):
Expand Down

0 comments on commit 4c5ea87

Please sign in to comment.