Skip to content

Commit

Permalink
Add missing local test dep and document it
Browse files Browse the repository at this point in the history
  • Loading branch information
hynek committed Sep 1, 2022
1 parent ccedc04 commit 92a441a
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
29 changes: 21 additions & 8 deletions CONTRIBUTING.rst
Original file line number Diff line number Diff line change
Expand Up @@ -89,12 +89,27 @@ Running the test suite
----------------------

We use the `twisted.trial`_ module and `tox`_ to run tests against all supported
Python versions and operating systems. All test dependencies, other than tox, are installed
automatically.
Python versions and operating systems.

The following list contains some ways how to run the test suite:

* To run all tests, use::
* To install this project into a virtualenv along with the dependencies necessary
to run the tests and build the documentation::

$ pip install -e .[dev]

* To run the tests, use ``trial`` like so::

$ trial towncrier

* To investigate and debug errors, use the ``trial`` command like this::

$ trial -b towncrier

This will invoke a PDB session. If you press ``c`` it will continue running
the test suite until it runs into an error.

* To run all tests against all supported versions, install tox and use::

$ tox

Expand All @@ -120,12 +135,10 @@ The following list contains some ways how to run the test suite:
$ pip install pre-commit
$ pre-commit install

* To investigate and debug errors, use the ``trial`` command like this::

$ trial -b towncrier

This command creates a virtual environment and invokes a PDB session.

**Please note**: If the test suite works in tox, but doesn't by calling
``trial``, it could be that you've got GPG-signing active for git commits which
fails with our dummy test commits.

.. ### Links
Expand Down
1 change: 1 addition & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@
"dev": [
"packaging",
"sphinx >= 5",
"twisted",
],
},
package_dir={"": "src"},
Expand Down
1 change: 1 addition & 0 deletions src/towncrier/newsfragments/415.doc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Improved contribution documentation.

0 comments on commit 92a441a

Please sign in to comment.