coincidence.selectors
Pytest decorators for selectively running tests.
Functions:
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return a |
|
Factory function to return decorators such as |
-
min_version
(version, reason=None)[source] Factory function to return a
@pytest.mark.skipif
decorator which will skip a test if the current Python version is less than the required one.
-
max_version
(version, reason=None)[source] Factory function to return a
@pytest.mark.skipif
decorator which will skip a test if the current Python version is greater than the required one.
-
only_version
(version, reason=None)[source] Factory function to return a
@pytest.mark.skipif
decorator which will skip a test if the current Python version not the required one.
-
not_windows
(reason='Not required on Windows') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test if the current platform is Windows.- Parameters
reason (
str
) – The reason to display when skipping. Default'Not required on Windows'
.- Return type
MarkDecorator
-
only_windows
(reason='Only required on Windows') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test unless the current platform is Windows.- Parameters
reason (
str
) – The reason to display when skipping. Default'Only required on Windows'
.- Return type
MarkDecorator
-
not_pypy
(reason='Not required on PyPy') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test if the current Python implementation is PyPy.- Parameters
reason (
str
) – The reason to display when skipping. Default'Not required on PyPy'
.- Return type
MarkDecorator
-
only_pypy
(reason='Only required on PyPy') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test unless the current Python implementation is PyPy.- Parameters
reason (
str
) – The reason to display when skipping. Default'Only required on PyPy'
.- Return type
MarkDecorator
-
not_macos
(reason='Not required on macOS') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test if the current platform is macOS.- Parameters
reason (
str
) – The reason to display when skipping. Default'Not required on macOS'
.- Return type
MarkDecorator
-
only_macos
(reason='Only required on macOS') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test unless the current platform is macOS.- Parameters
reason (
str
) – The reason to display when skipping. Default'Only required on macOS'
.- Return type
MarkDecorator
-
not_docker
(reason='Not required on Docker') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test if running on Docker.- Parameters
reason (
str
) – The reason to display when skipping. Default'Not required on Docker'
.- Return type
MarkDecorator
-
not_linux
(reason='Not required on Linux') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test if the current platform is Linux.New in version 0.2.0.
- Parameters
reason (
str
) – The reason to display when skipping. Default'Not required on Linux'
.- Return type
MarkDecorator
-
only_linux
(reason='Only required on Linux') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test unless the current platform is Linux.New in version 0.2.0.
- Parameters
reason (
str
) – The reason to display when skipping. Default'Only required on Linux'
.- Return type
MarkDecorator
-
only_docker
(reason='Only required on Docker') Factory function to return a
@pytest.mark.skipif
decorator which will skip a test unless running on Docker.- Parameters
reason (
str
) – The reason to display when skipping. Default'Only required on Docker'
.- Return type
MarkDecorator
-
platform_boolean_factory
(condition, platform, versionadded=None, *, module=None)[source] Factory function to return decorators such as
not_pypy()
andonly_windows()
.