Skip to content

Commit 1ab58d3

Browse files
committed
WORKFLOW: Added sections regarding PDB and PEP8
* Added more advanced testing commands - The exercises on exercism are good for practicing pdb, and I thought it would be beneficial to give a plug on using debuggers. - PEP8 is a common nitpick, and this would test for it before submission. I felt it should be encouraged, but optional.
1 parent 977e7db commit 1ab58d3

1 file changed

Lines changed: 28 additions & 1 deletion

File tree

docs/WORKFLOW.md

Lines changed: 28 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,38 @@ $ cd exercism/python/bob
4949
$ py.test -x --ff bob_test.py
5050
```
5151

52-
### Running All Tests for All Exercises
52+
####Running All Tests for All Exercises
5353

5454
```bash
5555
$ cd exercism/python/
5656
$ py.test
5757
```
5858

59+
####PDB
60+
61+
Will drop you into the python debugger when a test fails.
62+
To learn how to use pdb, check out the [documentation](https://docs.python.org/2/library/pdb.html#debugger-commands).
63+
64+
You may also be interested in watching [Clayton Parker's "So you think you can pdb?" PyCon 2015 talk](https://www.youtube.com/watch?v=P0pIW5tJrRM)
65+
66+
```bash
67+
$ cd exercism/python/bob
68+
$ py.test --pdb bob_test.py
69+
```
70+
71+
####PEP8
72+
73+
PEP8 is the [python style guide](https://www.python.org/dev/peps/pep-0008/). If you would like to test for compliance to the style guide, install [pytest-pep8](https://pypi.python.org/pypi/pytest-pep8)
74+
75+
```bash
76+
$ pip install pytest-pep8
77+
```
78+
79+
and add the pep8 flag to your command
80+
81+
```bash
82+
$ cd exercism/python/bob
83+
$ py.test --pep8 bob_test.py
84+
```
85+
5986
Read the [pytest documentation](http://pytest.org/latest/contents.html#toc) and [pytest-cache](http://pythonhosted.org/pytest-cache/) documentation to learn more.

0 commit comments

Comments
 (0)