Skip to content

Commit

Permalink
Pass arguments of test.sh to test_func/pytest
Browse files Browse the repository at this point in the history
Previously you had to modify scripts/test.sh to add command line
arguments to pytest. Now you can add them directly when calling test.sh.

This is useful if you, for example, want to filter the executed tests
using `-k`.
  • Loading branch information
psrb committed Oct 27, 2019
1 parent d00dafb commit 3c89d1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
3 changes: 3 additions & 0 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,9 @@ a test name, and insert into it some code. The tests will run pylint
against these modules. If the idea is that no messages now occur, then
that is fine, just check to see if it works by running ``scripts/test.sh``.

You can pass any pytest commaned line argument to ``scripts/test.sh``.
For example if you want to debug the tests you can execute ``scripts/test.sh --capture=no``.

Ideally, add some pylint error suppression messages to the file to prevent
spurious warnings, since these are all tiny little modules not designed to
do anything so there's no need to be perfect.
Expand Down
2 changes: 1 addition & 1 deletion scripts/test.sh
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
#!/bin/bash
python pylint_django/tests/test_func.py -v
python pylint_django/tests/test_func.py -v "$@"

0 comments on commit 3c89d1f

Please sign in to comment.