mirror of
https://github.com/outbackdingo/patroni.git
synced 2026-08-25 14:53:37 +00:00
add some guide to run tests in different scopes (#2921)
Introduce ways to run tests in different scopes which should be helpful for beginners.
This commit is contained in:
@@ -43,6 +43,13 @@ After you have all dependencies installed, you can run the various test suites:
|
||||
# Run the pytest suite in tests/:
|
||||
python setup.py test
|
||||
|
||||
# Moreover, you may want to run tests in different scopes for debugging purposes,
|
||||
# the -s option include print output during test execution.
|
||||
# Tests in pytest typically follow the pattern: FILEPATH::CLASSNAME::TESTNAME.
|
||||
pytest -s tests/test_api.py
|
||||
pytest -s tests/test_api.py::TestRestApiHandler
|
||||
pytest -s tests/test_api.py::TestRestApiHandler::test_do_GET
|
||||
|
||||
# Run the behave (https://behave.readthedocs.io/en/latest/) test suite in features/;
|
||||
# modify DCS as desired (raft has no dependencies so is the easiest to start with):
|
||||
DCS=raft python -m behave
|
||||
|
||||
Reference in New Issue
Block a user