Mercurial > p > roundup > code
comparison test/test_redis_session.py @ 7822:1b7162938988
test: add pyproject.toml: set pytest and ruff project defaults
Pytest 6 is required to use this. This means it works only for python3.
It includes a dummy setting for redis password assuming redis is
running at the default port. This requires pytest-env be installed.
At some point I expect to add project and build-system tables to allow
building using the build package. The version and long_description
specifiers in the project table will be dynamic since the version is
from roundup/__init__.py and description from doc/announcement.txt.
One open issue is how to support the equivalent of:
python setup.py build_doc
to run sphinx over the docs and include them in the share directory
bundled with the distributions.
Modified test_redis_session.py to better handle empty password.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Sat, 23 Mar 2024 02:56:01 -0400 |
| parents | 07f8737fe04c |
| children | a4923cec0afa |
comparison
equal
deleted
inserted
replaced
| 7821:aa1fd8704469 | 7822:1b7162938988 |
|---|---|
| 43 ''' | 43 ''' |
| 44 | 44 |
| 45 SessionTest.setUp(self) | 45 SessionTest.setUp(self) |
| 46 | 46 |
| 47 import os | 47 import os |
| 48 if 'pytest_redis_pw' in os.environ: | 48 if 'pytest_redis_pw' in os.environ and os.environ['pytest_redis_pw']: |
| 49 pw = os.environ['pytest_redis_pw'] | 49 pw = os.environ['pytest_redis_pw'] |
| 50 if ':' in pw: | 50 if ':' in pw: |
| 51 # pw is user:password | 51 # pw is user:password |
| 52 pw = "%s@" % pw | 52 pw = "%s@" % pw |
| 53 else: | 53 else: |
