Skip to content

Commit

Permalink
Merge pull request #1902 from TatchNicolas/fix/typo_in_hooks_doc
Browse files Browse the repository at this point in the history
Missing colons after else keyword in Event Hooks doc
  • Loading branch information
cyberw authored Oct 11, 2021
2 parents daf50e8 + a8c40b0 commit 4267843
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions docs/extending-locust.rst
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,14 @@ You can check to ensure you aren't running on the master node by checking the ty
def on_test_start(environment, **kwargs):
if not isinstance(environment.runner, MasterRunner):
print("Beginning test setup")
else
else:
print("Started test from Master node")

@events.test_stop.add_listener
def on_test_stop(environment, **kwargs):
if not isinstance(environment.runner, MasterRunner):
print("Cleaning up test data")
else
else:
print("Stopped test from Master node")

You can also use events `to add custom command line arguments <https://github.com/locustio/locust/tree/master/examples/add_command_line_argument.py>`_.
Expand Down

0 comments on commit 4267843

Please sign in to comment.