Skip to content

Commit 022b1a1

Browse files
authored
[IMPROVEMENT] Update pytest config and related doc (#214)
* [IMPROVEMENT] Update pytest config and related doc * Update CONTRIBUTING.rst * Update Makefile * Update tox.ini
1 parent ca84e12 commit 022b1a1

File tree

4 files changed

+5
-7
lines changed

4 files changed

+5
-7
lines changed

CONTRIBUTING.rst

+2-2
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ Ready to contribute? Here's how to set up `scrapy-redis` for local development.
7979
5. When you're done making changes, check that your changes pass flake8 and the tests, including testing other Python versions with tox::
8080

8181
$ flake8 scrapy_redis tests
82-
$ python setup.py test or py.test
82+
$ pytest --ignore=setup.py
8383
$ tox
8484

8585
To get flake8 and tox, just pip install them into your virtualenv.
@@ -110,4 +110,4 @@ Tips
110110

111111
To run a subset of tests::
112112

113-
$ py.test tests.test_scrapy_redis
113+
$ pytest tests/test_scrapy_redis

Makefile

+2-2
Original file line numberDiff line numberDiff line change
@@ -91,13 +91,13 @@ develop: clean
9191
pip install -e .
9292

9393
test: develop
94-
py.test
94+
pytest --ignore=setup.py
9595

9696
test-all:
9797
tox -v
9898

9999
coverage: develop
100-
coverage run -m py.test
100+
coverage run -m pytest --ignore=setup.py
101101
coverage combine
102102
coverage report
103103
coverage html

pytest.ini

-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,5 @@ python_files =
77
test_*.py
88
*_test.py
99
tests.py
10-
ignore =
11-
setup.py
1210
addopts =
1311
-rxEfsw -v

tox.ini

+1-1
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,4 @@ commands =
1818
scrapy1x: pip install scrapy>=1.0,<2.0
1919
scrapyrel: pip install scrapy
2020
scrapydev: pip install https://github.com/scrapy/scrapy/archive/master.zip
21-
{posargs:coverage run -m py.test}
21+
{posargs:coverage run -m pytest --ignore=setup.py }

0 commit comments

Comments
 (0)