Skip to content

Commit 7b8f7fc

Browse files
committed
Skip redis tests if unable to communicate with the server.
If the redis module is in the test environment, the redis tests will not be skipped. If connecting to redis during testing fails with a ConnectionError because there is no redis server at localhost, or if it fails with an AuthenticationError, you would fail a slew of tests. This causes the tests to report as skipped if either of the two errors occurs. It is very inefficient as it fails in setup() for the tests, but at least it does report skipping the tests. Also documented how to pass the redis password to the tests in the test part of the install docs. Future note: running tests needs proper docs in development.txt (including database setup) and a link left to that doc in installation.txt.
1 parent 73213aa commit 7b8f7fc

File tree

1 file changed

+6
-0
lines changed

1 file changed

+6
-0
lines changed

doc/installation.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2126,6 +2126,12 @@ roundup's source, if you have pytest installed, run ``python -m
21262126
pytest test`` in the Roundup source directory and make sure there
21272127
are no errors. If there are errors, please let us know!
21282128

2129+
Note that redis tests uses database 15 of the redis server running on
2130+
localhost.The tests verify that the database is empty before the redis
2131+
tests start. If you use a password on your redis database it can be
2132+
specified in the ``pytest_redis_pw`` environment variable when you run
2133+
the test.
2134+
21292135
.. _`user guide`: user_guide.html
21302136
.. _`roundup specification`: spec.html
21312137
.. _`tracker configuration`: reference.html#tracker-configuration

0 commit comments

Comments
 (0)