comparison doc/developers.txt @ 7475:3ff266644794

Add testing notes. pytest-testmon and reversing tests to look for dependencies.
author John Rouillard <rouilj@ieee.org>
date Thu, 08 Jun 2023 21:54:38 -0400
parents 623502678b97
children 3134415ffb8a
comparison
equal deleted inserted replaced
7474:1cf1ffa65522 7475:3ff266644794
180 If you set the environment variable SENDMAILDEBUG to a filename, 180 If you set the environment variable SENDMAILDEBUG to a filename,
181 roundup will write each email message that it sends to that file 181 roundup will write each email message that it sends to that file
182 instead to the internet. This environment variable is independent of 182 instead to the internet. This environment variable is independent of
183 the python -O flag. 183 the python -O flag.
184 184
185 Testing Notes
186 -------------
187
188 Create tests for your changes. Also run the tests in reverse to try to
189 identify test dependencies. You can do this by creating a
190 ``conftest.py`` in the top of the source tree and include the
191 following contents::
192
193 def pytest_collection_modifyitems(items):
194 items.reverse()
195
196 to run all the tests in reverse. More tips at: https://testmon.org/blog/hidden-test-dependencies/.
197
198 The full test suite can take a while to run. The `pytest-testmon
199 <https://pypi.org/project/pytest-testmon/>`_ package can be installed
200 with pip. It analyzes changes to code and run tests that test that
201 code. This can significantly reduce the time it takes to run a basic
202 test suite. Use it by running::
203
204 python3 -m pytest -v --testmon test
205
206 once over the whole test suite. Then subsequent calls will analyze the
207 changed files/functions and run tests that cover those changes.
185 208
186 Internationalization Notes 209 Internationalization Notes
187 -------------------------- 210 --------------------------
188 211
189 How stuff works: 212 How stuff works:

Roundup Issue Tracker: http://roundup-tracker.org/