Skip to content

Commit 5421f42

Browse files
committed
Remove standalone pytest run_tests.py bundle
Newer pytest doesn't support generating stand alone testing bundles. Python 3.9 generates errors running the current run_tests.py. Changed doc to use pythonX -m pytest test/ and some light directions on how to install pytest. Thanks to jerrykan for recommendations on how to do the doc updates.
1 parent 2e1e9f6 commit 5421f42

File tree

7 files changed

+30
-20
lines changed

7 files changed

+30
-20
lines changed

CHANGES.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,9 @@ Fixed:
5252
- replace deprecated base64.decodestring with base64.b64decode in
5353
roundup_server.py and roundup_xlmrpc_server.py (reported by
5454
lmsteffan in irc)
55+
- removed run_tests.py. Newer pytest doesn't support generating
56+
stand alone testing bundles. Python 3.9 generates errors running
57+
the current run_tests.py.
5558

5659
Features:
5760
- issue2550522 - Add 'filter' command to command-line

MANIFEST.in

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ recursive-include test *.py *.txt
77
recursive-include doc *.html *.png *.txt *.css *.example
88
recursive-include detectors *.py README.txt
99
global-exclude *.pyc *.pyo .DS_Store *.orig *.rej *~ \#*
10-
include run_tests.py demo.py *.txt
10+
include demo.py *.txt
1111
include doc/conf.py doc/roundup-favicon.ico
1212
exclude doc/security.txt
1313
include locale/*.po locale/*.mo locale/roundup.pot

RELEASE.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,11 @@ Roundup release checklist:
1414
in the locale directory. Run:
1515
make template
1616
make *.po
17-
2. Run unit tests! They should pass successfully. "./run_tests.py"
17+
2. Run unit tests! They should pass successfully. Install pytest
18+
using pip2/pip3 for python2 and python3. Then invoke pytest
19+
using both python versions from the top of the roundup tree:
20+
python3 -m pytest test/
21+
python2 -m pytest test/
1822
3. Update version
1923
CHANGES.txt
2024
roundup/__init__.py
@@ -46,6 +50,7 @@ Roundup release checklist:
4650
8. Rebuild documentation in "share/doc/roundup/html"
4751
python setup.py build_doc
4852
9. python setup.py sdist --manifest-only
53+
(ignore the 'warning: no previously-included ...' lines)
4954
10. Check the MANIFEST to make sure that any new files are included.
5055
(use hg status --rev <last release or tag>:tip to list changed
5156
added and removed files. Last release e.g. 1.5.1 where tip was
@@ -65,7 +70,8 @@ Roundup release checklist:
6570
command)
6671
12. Unpack the new tarball created in dist/roundup-<version>.tar.gz
6772
file in /tmp then
68-
a) run_tests.py
73+
a) run tests using installed pytest run under python2 and
74+
python3. (python2 -m pytest test/; python3 -m pytest test/)
6975
b) demo.py
7076
with all available Python versions.
7177
13. Assuming all is well tag the release in the version-control

doc/admin_guide.txt

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,9 +262,15 @@ Software Upgrade
262262
Always make a backup of your tracker before upgrading software. Steps you may
263263
take:
264264

265-
1. Ensure that the unit tests run on your system::
265+
1. Install pytest and ensure that the unit tests run on your system
266+
(using your preferred python version)::
266267

267-
python run_tests.py
268+
pip2 install pytest
269+
python2 -m pytest test/
270+
271+
272+
pip3 install pytest
273+
python3 -m pytest test/
268274

269275
2. If you're using an RDBMS backend, make a backup of its contents now.
270276
3. Make a backup of the tracker home itself.

doc/debugging.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ of ways, depending on what it is you're testing:
77
1. If you're testing the database unit tests, then set the environment
88
variable ``LOGGING_LEVEL=DEBUG``. This may be done like so:
99

10-
LOGGING_LEVEL=DEBUG python run_tests.py
10+
LOGGING_LEVEL=DEBUG python -m pytest test/
1111

1212
This variable replaces the older HYPERDBDEBUG environment var.
1313

doc/installation.txt

Lines changed: 8 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1408,9 +1408,11 @@ Problems? Testing your Python...
14081408
================================
14091409

14101410
.. note::
1411-
The ``run_tests.py`` script is packaged in Roundup's source distribution
1412-
- users of the Windows installer, other binary distributions or
1413-
pre-installed Roundup will need to download the source to use it.
1411+
The ``run_tests.py`` script is not packaged in Roundup's source
1412+
distribution anymore. You should install pytest using your
1413+
distributions package manger or using pip/pip2/pip3 to install
1414+
pytest for your python version. See the `administration guide`_
1415+
for details.
14141416

14151417
Remember to have a database user 'rounduptest' prepared (with
14161418
password 'rounduptest'). This user
@@ -1419,16 +1421,9 @@ Problems? Testing your Python...
14191421
for PostgreSQL you want to call the ``createuser`` command with the
14201422
``-d`` option to allow database creation.
14211423

1422-
Once you've unpacked roundup's source, run ``python run_tests.py`` in the
1423-
source directory and make sure there are no errors. If there are errors,
1424-
please let us know!
1425-
1426-
If the above fails, you may be using the wrong version of python. Try
1427-
``python2 run_tests.py`` or ``python2.7 run_tests.py``.
1428-
If that works, you will need to substitute ``python2`` or ``python2.7``
1429-
for ``python`` in all further commands you use in relation to Roundup --
1430-
from installation and scripts.
1431-
1424+
Once you've unpacked roundup's source, if you have pytest installed,
1425+
run ``python -m pytest /test`` in the source directory and make sure
1426+
there are no errors. If there are errors, please let us know!
14321427

14331428
.. _`table of contents`: index.html
14341429
.. _`user guide`: user_guide.html

test/db_test_base.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1044,7 +1044,7 @@ def testQuietJournal(self):
10441044
#print l
10451045
## change 'roundup.hyperdb' to the logging name you want to capture.
10461046
## print l just prints the output. Run using:
1047-
## ./run_tests.py --capture=no -k testQuietJournal test/test_anydbm.py
1047+
## python -m pytest --capture=no -k testQuietJournal test/test_anydbm.py
10481048

10491049
# FIXME There should be a test via
10501050
# template.py::_HTMLItem::history() and verify the output.

0 commit comments

Comments
 (0)