changeset 6297:a635a60ffb84

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.
author John Rouillard <rouilj@ieee.org>
date Sun, 20 Dec 2020 11:08:57 -0500
parents 6cf9f2f49b89
children 1be7af9a2b53
files CHANGES.txt MANIFEST.in RELEASE.txt doc/admin_guide.txt doc/debugging.txt doc/installation.txt test/db_test_base.py
diffstat 7 files changed, 30 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/CHANGES.txt	Mon Dec 14 21:25:56 2020 -0500
+++ b/CHANGES.txt	Sun Dec 20 11:08:57 2020 -0500
@@ -52,6 +52,9 @@
 - replace deprecated base64.decodestring with base64.b64decode in
   roundup_server.py and roundup_xlmrpc_server.py (reported by
   lmsteffan in irc)
+- removed run_tests.py. Newer pytest doesn't support generating
+  stand alone testing bundles. Python 3.9 generates errors running
+  the current run_tests.py.
 
 Features:
 - issue2550522 - Add 'filter' command to command-line
--- a/MANIFEST.in	Mon Dec 14 21:25:56 2020 -0500
+++ b/MANIFEST.in	Sun Dec 20 11:08:57 2020 -0500
@@ -7,7 +7,7 @@
 recursive-include doc *.html *.png *.txt *.css *.example
 recursive-include detectors *.py README.txt
 global-exclude *.pyc *.pyo .DS_Store *.orig *.rej *~ \#*
-include run_tests.py demo.py *.txt
+include demo.py *.txt
 include doc/conf.py doc/roundup-favicon.ico
 exclude doc/security.txt
 include locale/*.po locale/*.mo locale/roundup.pot
--- a/RELEASE.txt	Mon Dec 14 21:25:56 2020 -0500
+++ b/RELEASE.txt	Sun Dec 20 11:08:57 2020 -0500
@@ -14,7 +14,11 @@
     in the locale directory. Run:
        make template
        make *.po
-2.  Run unit tests! They should pass successfully. "./run_tests.py"
+2.  Run unit tests! They should pass successfully. Install pytest
+    using pip2/pip3 for python2 and python3. Then invoke pytest
+    using both python versions from the top of the roundup tree:
+        python3 -m pytest test/
+        python2 -m pytest test/
 3.  Update version
       CHANGES.txt
       roundup/__init__.py
@@ -46,6 +50,7 @@
 8.  Rebuild documentation in "share/doc/roundup/html"
       python setup.py build_doc
 9.  python setup.py sdist --manifest-only
+    (ignore the 'warning: no previously-included ...' lines)
 10. Check the MANIFEST to make sure that any new files are included.
       (use hg status --rev <last release or tag>:tip to list changed
       added and removed files. Last release e.g. 1.5.1 where tip was
@@ -65,7 +70,8 @@
      command)
 12. Unpack the new tarball created in dist/roundup-<version>.tar.gz
     file in /tmp then
-      a) run_tests.py
+      a) run tests using installed pytest run under python2 and
+         python3. (python2 -m pytest test/; python3 -m pytest test/)
       b) demo.py
     with all available Python versions.
 13. Assuming all is well tag the release in the version-control
--- a/doc/admin_guide.txt	Mon Dec 14 21:25:56 2020 -0500
+++ b/doc/admin_guide.txt	Sun Dec 20 11:08:57 2020 -0500
@@ -262,9 +262,15 @@
 Always make a backup of your tracker before upgrading software. Steps you may
 take:
 
-1. Ensure that the unit tests run on your system::
+1. Install pytest and ensure that the unit tests run on your system
+   (using your preferred python version)::
 
-    python run_tests.py
+    pip2 install pytest
+    python2 -m pytest test/
+
+
+    pip3 install pytest
+    python3 -m pytest test/
 
 2. If you're using an RDBMS backend, make a backup of its contents now.
 3. Make a backup of the tracker home itself.
--- a/doc/debugging.txt	Mon Dec 14 21:25:56 2020 -0500
+++ b/doc/debugging.txt	Sun Dec 20 11:08:57 2020 -0500
@@ -7,7 +7,7 @@
 1. If you're testing the database unit tests, then set the environment
    variable ``LOGGING_LEVEL=DEBUG``. This may be done like so:
 
-    LOGGING_LEVEL=DEBUG python run_tests.py
+    LOGGING_LEVEL=DEBUG python -m pytest test/
 
    This variable replaces the older HYPERDBDEBUG environment var.
 
--- a/doc/installation.txt	Mon Dec 14 21:25:56 2020 -0500
+++ b/doc/installation.txt	Sun Dec 20 11:08:57 2020 -0500
@@ -1408,9 +1408,11 @@
 ================================
 
 .. note::
-   The ``run_tests.py`` script is packaged in Roundup's source distribution
-   - users of the Windows installer, other binary distributions or
-   pre-installed Roundup will need to download the source to use it.
+   The ``run_tests.py`` script is not packaged in Roundup's source
+   distribution anymore. You should install pytest using your
+   distributions package manger or using pip/pip2/pip3 to install
+   pytest for your python version. See the `administration guide`_
+   for details.
 
    Remember to have a database user 'rounduptest' prepared (with
    password 'rounduptest'). This user
@@ -1419,16 +1421,9 @@
    for PostgreSQL you want to call the ``createuser`` command with the
    ``-d`` option to allow database creation.
 
-Once you've unpacked roundup's source, run ``python run_tests.py`` in the
-source directory and make sure there are no errors. If there are errors,
-please let us know!
-
-If the above fails, you may be using the wrong version of python. Try
-``python2 run_tests.py`` or ``python2.7 run_tests.py``.
-If that works, you will need to substitute ``python2`` or ``python2.7``
-for ``python`` in all further commands you use in relation to Roundup --
-from installation and scripts.
-
+Once you've unpacked roundup's source, if you have pytest installed,
+run ``python -m pytest /test`` in the source directory and make sure
+there are no errors. If there are errors, please let us know!
 
 .. _`table of contents`: index.html
 .. _`user guide`: user_guide.html
--- a/test/db_test_base.py	Mon Dec 14 21:25:56 2020 -0500
+++ b/test/db_test_base.py	Sun Dec 20 11:08:57 2020 -0500
@@ -1044,7 +1044,7 @@
         #print l
         ## change 'roundup.hyperdb' to the logging name you want to capture.
         ## print l just prints the output. Run using:
-        ## ./run_tests.py --capture=no -k testQuietJournal test/test_anydbm.py
+        ## python -m pytest --capture=no -k testQuietJournal test/test_anydbm.py
 
         # FIXME There should be a test via
         # template.py::_HTMLItem::history() and verify the output.

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