mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-04 03:52:56 +00:00
pytest: improve documentation and protect against wrong versions
It's quite hard to get python2 to exit gracefully when the code was intended for python3, because the interpreter will SyntaxError before running a single line of code. Thankfully, the pytest developers put a version check in their .ini config, so that should gracefully handle both wrong-pytest-version and wrong-python-version. Also document the woes of trying to run the pytest version shipped by e.g. Debian or Ubuntu.
This commit is contained in:
@@ -3,13 +3,20 @@
|
||||
This directory contains integration tests.
|
||||
|
||||
Prerequisites:
|
||||
- pytest, psycopg2
|
||||
Install using something like this:
|
||||
- `pip3 install pytest psycopg2` (Debian or Ubuntu)
|
||||
|
||||
- an already compiled zenith + postgres tree
|
||||
- See the root README.md for details
|
||||
|
||||
- Python 3.6 or later
|
||||
- Python packages: pytest, psycopg2
|
||||
- pytest 6.0 is required.
|
||||
- __NOTE: `apt install` on Debian/Ubuntu won't work.__
|
||||
They ship a much older version of pytest (and sometimes rename it to
|
||||
`pytest-3`.)
|
||||
- Install using something like this:
|
||||
- `pip3 install pytest psycopg2` (Debian or Ubuntu)
|
||||
- Zenith and Postgres binaries
|
||||
- See the root README.md for build directions
|
||||
- Tests can be run from the git tree; or see the environment variables
|
||||
below to run from other directories.
|
||||
- The zenith git repo, including the postgres submodule
|
||||
(for some tests, e.g. pg_regress)
|
||||
|
||||
### Running the tests
|
||||
|
||||
|
||||
2
test_runner/pytest.ini
Normal file
2
test_runner/pytest.ini
Normal file
@@ -0,0 +1,2 @@
|
||||
[pytest]
|
||||
minversion = 6.0
|
||||
Reference in New Issue
Block a user