issues
search
sphinx-contrib
/
sphinxcontrib-towncrier
An RST directive for injecting a Towncrier-generated changelog draft containing fragments for the unreleased (next) project version. Demo: https://ansible-pylibssh.rtfd.io/changelog. Docs: https://sphinxcontrib-towncrier.rtfd.io
https://pypi.org/p/sphinxcontrib-towncrier
BSD 3-Clause "New" or "Revised" License
19
stars
18
forks
source link
Add testing infrastructure
#35
Open
webknjaz
opened
4 years ago
webknjaz
commented
4 years ago
[x] Configure pytest with a few essential plugins. e.g.
https://github.com/ansible/pylibssh/blob/830218bf59c10e0a265638943878c3b13d46ca1d/pytest.ini
[x] Set up tox to run pytest allowing to pass extra args via
{posargs}
. e.g.
https://github.com/ansible/pylibssh/blob/830218bf59c10e0a265638943878c3b13d46ca1d/tox.ini#L11-L43
[x] Add a very basic test infra. e.g.
https://github.com/ansible/pylibssh/blob/830218bf59c10e0a265638943878c3b13d46ca1d/tests/unit/version_test.py#L15-L17
Pro tip:
Start with just one test function having only
assert True
. This will allow you to check that you've configured all of the other bits correctly. Your goal is to see this test in the report and have it green.
[x] Add a GHA workflow for running the tests. e.g.
https://github.com/ansible/pylibssh/blob/830218bf59c10e0a265638943878c3b13d46ca1d/.github/workflows/build-test-n-publish.yml#L656
Start small, with one job. Then, extend it to be a matrix across different Python versions (as specified in
setup.cfg
) and OSs.
[ ] Finally, add a few unit tests for helper functions in the extension.
[ ] Add heavier integration tests too.
{posargs}
. e.g. https://github.com/ansible/pylibssh/blob/830218bf59c10e0a265638943878c3b13d46ca1d/tox.ini#L11-L43assert True
. This will allow you to check that you've configured all of the other bits correctly. Your goal is to see this test in the report and have it green.setup.cfg
) and OSs.