diff options
author | Daniel Hahler <github@thequod.de> | 2018-10-30 13:40:53 +0100 |
---|---|---|
committer | Chris Dent <chris.dent@gmail.com> | 2018-10-30 12:40:53 +0000 |
commit | 455203d2b3b0c898df6d3661cb1de577dfeda483 (patch) | |
tree | c86f8fd4df56ac146bcfdc87552dc645516c9d80 /docs/DeveloperGuidelines.txt | |
parent | 495ff974d1a972f3751bd6d142813f326bc3f1c1 (diff) | |
download | paste-git-455203d2b3b0c898df6d3661cb1de577dfeda483.tar.gz |
Pytest fixes (#9)
* pytest: fix collection warnings via __test__=False
Fixes
> "cannot collect test class %r because it has a __init__ constructor
Ref: https://github.com/pytest-dev/pytest/issues/2007
* pytest: configure testpaths
This is faster with test collection.
* pytest: fix warning with doctests
Fixes
> /usr/lib/python3.7/site-packages/_pytest/python.py:764:
> RemovedInPytest4Warning: usage of Generator.Function is deprecated,
> please use pytest.Function instead
* Minor fixes around s/py.test/pytest/
Diffstat (limited to 'docs/DeveloperGuidelines.txt')
-rw-r--r-- | docs/DeveloperGuidelines.txt | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/docs/DeveloperGuidelines.txt b/docs/DeveloperGuidelines.txt index 69f39ee..efd602d 100644 --- a/docs/DeveloperGuidelines.txt +++ b/docs/DeveloperGuidelines.txt @@ -52,15 +52,15 @@ is going to bite your head off for committing something. the work here. Paste Script contains several wrappers for external projects (servers in particular). -* Tests are good. We use py.test_, because it is simple. I want to +* Tests are good. We use pytest_, because it is simple. I want to use doctests too, but the infrastructure isn't really there now -- but please feel free to use those too. ``unittest`` is kind of - annoying, and py.test is both more powerful and easier to write for. + annoying, and pytest is both more powerful and easier to write for. Tests should go in the ``tests/`` directory. ``paste.fixture`` contains some convenience functions for testing WSGI applications and middleware. Pay particular attention to ``TestApp``. - -.. _py.test: http://codespeak.net/py/current/doc/test.html + +.. _pytest: https://docs.pytest.org/en/latest/ * If you move something around that someone may be using, keep their imports working and introduce a warning, like:: |