Skip to content

Commit

Permalink
Break tests to uncover bug in delay_checks=True functionality
Browse files Browse the repository at this point in the history
  • Loading branch information
xolox committed Oct 6, 2015
1 parent a9f80b3 commit 58049a4
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions executor/tests.py
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,16 @@ def test_command_pool_delay_checks(self):
# Make sure all commands finished.
assert all(cmd.is_finished for id, cmd in pool.commands)

def test_command_pool_delay_checks_noop(self):
"""Make sure command pools with delayed error checking don't raise when ``check=False``."""
pool = CommandPool(delay_checks=True)
# Include a command that fails immediately.
pool.add(ExternalCommand('exit 1', check=False))
# Run the command pool without catching exceptions; we don't except any.
pool.run()
# Make sure the command failed even though the exception wasn't raised.
assert all(cmd.failed for id, cmd in pool.commands)

def test_command_pool_logs_directory(self):
"""Make sure command pools can log output of commands in a directory."""
root_directory = tempfile.mkdtemp()
Expand Down

0 comments on commit 58049a4

Please sign in to comment.