Skip to content

Commit

Permalink
Merge pull request #104 from avallbona/patch-2
Browse files Browse the repository at this point in the history
removed the dot on the pytest command on  the README.md
  • Loading branch information
joeyespo committed Jun 15, 2019
2 parents 54a8e4b + 73715db commit 17375a1
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions README.md
Expand Up @@ -14,7 +14,7 @@ Motivation

Whether or not you use the test-driven development method, running tests
continuously is far more productive than waiting until you're finished
programming to test your code. Additionally, manually running `py.test` each
programming to test your code. Additionally, manually running `pytest` each
time you want to see if any tests were broken has more wait-time and cognitive
overhead than merely listening for a notification. This could be a crucial
difference when debugging a complex problem or on a tight deadline.
Expand Down Expand Up @@ -69,27 +69,27 @@ $ ptw --beforerun init_db.py
```

Or after they finish, e.g. deleting a sqlite file. Note that this script receives
the exit code of `py.test` as an argument.
the exit code of `pytest` as an argument.

```bash
$ ptw --afterrun cleanup_db.py
```

You can also use a custom runner script for full `py.test` control:
You can also use a custom runner script for full `pytest` control:

```bash
$ ptw --runner "python custom_pytest_runner.py"
```

Here's an minimal runner script that runs `py.test` and prints its exit code:
Here's an minimal runner script that runs `pytest` and prints its exit code:

```py
# custom_pytest_runner.py

import sys
import pytest

print('py.test exited with code:', pytest.main(sys.argv[1:]))
print('pytest exited with code:', pytest.main(sys.argv[1:]))
```

Need to exclude directories from being observed or collected for tests?
Expand Down Expand Up @@ -118,11 +118,11 @@ Options:
Otherwise, tests are interrupted on filesystem events.
--beforerun <cmd> Run arbitrary command before tests are run.
--afterrun <cmd> Run arbitrary command on completion or interruption.
The exit code of "py.test" is passed as an argument.
The exit code of "pytest" is passed as an argument.
--onpass <cmd> Run arbitrary command on pass.
--onfail <cmd> Run arbitrary command on failure.
--onexit <cmd> Run arbitrary command when exiting pytest-watch.
--runner <cmd> Run a custom command instead of "py.test".
--runner <cmd> Run a custom command instead of "pytest".
--pdb Start the interactive Python debugger on errors.
This also enables --wait to prevent pdb interruption.
--spool <delay> Re-run after a delay (in milliseconds), allowing for
Expand Down Expand Up @@ -161,7 +161,7 @@ Alternatives
options). This instead re-runs only those tests which have failed until you
make them pass. This can be a speed advantage when trying to get all tests
passing, but leaves out the discovery of new failures until then. It also
drops the colors outputted by py.test, whereas pytest-watch doesn't.
drops the colors outputted by pytest, whereas pytest-watch doesn't.
- [Nosey][] is the original codebase this was forked from. Nosey runs [nose][]
instead of pytest.

Expand Down

0 comments on commit 17375a1

Please sign in to comment.