pytest-integration
Overview
Plugin for pytest to mark tests as integration or slow integration.
Integration tests are run after normal tests (unit tests) and slow integration tests are run after (quick) integration tests.
If a unit test fails, (quick) integration and slow integration tests are not run.
If a (quick) integration tests fails, slow integration tests are not run.
If you have also installed pytest-cov, then code coverage is disabled for all integration tests, since unit tests are supposed to cover all the code.
Added pytest markers
@pytest.mark.integration_testMarks this test as a (quick) integration test@pytest.mark.slow_integration_testMarks this test as a slow integration test
Added pytest command line options
--with-integrationRun (quick) integration tests (default)--with-slow-integrationRun slow integration tests (default)--integration-coverLet integration tests contribute to coverage
with options also have a without variant.
Example
See the example directory. Examples of how to run are in the Makefile.
Compatibility
- When running under xdist, each node will pick tests based on an index. That means that nodes that receive only unit tests that pass, will continue to run (slow) integration tests, even if another node receives a unit test that fails.
Release files for pytest-integration 0.2.3
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| pytest_integration-0.2.3.tar.gz | 3.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_integration-0.2.3-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 7.8 kB
Release files / pytest_integration-0.2.3.tar.gz
| Download URL | pytest_integration-0.2.3.tar.gz |
|---|---|
| Size | 3.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
b00988a5de8a6826af82d4c7a3485b43fbf32c11235e9f4a8b7225eef5fbcf65
|
|
BLAKE2b-256 checksum How to use checksums |
35e0c823048dc0866f2e0fa2e4a34cd6ec290697b238b7672b30cb07c65e59cc
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|
Release files / pytest_integration-0.2.3-py3-none-any.whl
| Download URL | pytest_integration-0.2.3-py3-none-any.whl |
|---|---|
| Size | 4.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7f59ed1fa1cc8cb240f9495b68bc02c0421cce48589f78e49b7b842231604b12
|
|
BLAKE2b-256 checksum How to use checksums |
1b419b393be6252635e4d39c3e62805018c42bfcc486b42246b582b755ff9ad3
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.1 CPython/3.8.10
|