Skip to content

Commit f36c1db

Browse files
committed
Made contributing instructions slightly elaborate with regards to testing
1 parent d231880 commit f36c1db

1 file changed

Lines changed: 25 additions & 5 deletions

File tree

CONTRIBUTING.md

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,17 +45,37 @@ $ git checkout -b my_awesome_branch
4545
#### Testing
4646
Before submitting any PR make sure your code passes all the tests.
4747

48-
Create virtual environment and activate
48+
To run the full test-suite, make sure you have `tox` installed and run the following command:
49+
50+
```bash
51+
$ tox
52+
```
53+
54+
Or to speed it up (replace 8 with your number of cores), run:
55+
56+
```bash
57+
$ tox -p8
4958
```
59+
60+
During development I recommend using pytest directly and installing the package in development mode.
61+
62+
Create virtual environment and activate
63+
```bash
5064
$ python3 -m venv venv
5165
$ source venv/bin/activate
5266
```
5367
Install test requirements
54-
```
68+
```bash
5569
$ cd python-utils
56-
$ pip install -r _python_utils_tests/requirements.txt
70+
$ pip install -e ".[tests]"
5771
```
5872
Run tests
73+
```bash
74+
$ py.test
75+
```
76+
77+
Note that this won't run `flake8` yet, so once all the tests succeed you can run `flake8` to check for code style errors.
78+
79+
```bash
80+
$ flake8
5981
```
60-
$ tox
61-
```

0 commit comments

Comments
 (0)