Registry / testing / pytest-explicit

pytest-explicit

JSON →
library1.0.1pypypi✓ verified 86d ago

A Pytest plugin that allows tests to be marked as `@pytest.mark.explicit`, causing them to be skipped by default. Tests can be explicitly run by passing the `--explicit` flag. Version 1.0.1 is the latest and stable, with no new releases since 2021.

pip install pytest-explicit
INSTALL
IMPORT
SIG · PYTEST-EXPLICIT
P
pytest-explicit
testingpythonv1.0.1
Install
2.7s avg
Import
388ms
Disk
29MB
Pass rate
10/ 10
Env Coverage10 / 10
glibc
3.93.13
musl
3.93.13
Install & Compatibility
Where this runs
tested against v1.0.1 · pip install
no network on importno background threads
Install × environment matrix
Each cell = how many times install + import succeeded across repeated harness runs. Partial = flaky.
glibc = Debian/Ubuntu slim · musl = Alpine Linux
musl
py 3.103.95 runs
installs and imports cleanly · install 0.0s · import 0.422s · 30.7MB
glibc
py 3.103.95 runs
installs and imports cleanly · install 2.7s · import 0.354s · 31MB
29MB installed
● package 29MB
Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

pytest.mark.explicit
import pytest
No import needed; just use the marker.
--explicit
pytest --explicit
CLI flag, no import.

Mark a test with @pytest.mark.explicit to skip it by default. Use --explicit flag to include it.

# test_example.py import pytest @pytest.mark.explicit def test_slow(): assert True def test_fast(): assert True # Run with: pytest --explicit # runs both # Run without: pytest # skips test_slow
Debug
Known issues
gotchaThe marker name is `explicit`, not `explicitly` or `explicit_test`. Typos will not be recognized by the plugin and the test will run normally, causing confusion.
fix
Use exactly `@pytest.mark.explicit` (spelling: e-x-p-l-i-c-i-t).
affects: all
gotchaThe `--explicit` flag must be placed before any positional arguments or test file paths. If placed after, it may be ignored.
fix
Run `pytest --explicit tests/` instead of `pytest tests/ --explicit`.
affects: all
deprecatedThis plugin has not been updated since 2021 and may not be compatible with newer pytest versions (e.g., pytest 8+). No known breaking changes as of pytest 7.x.
fix
Test your pytest version; if incompatible, consider using pytest's built-in `--markers` or `-k` expressions.
affects: pytest >= 8.0
Errors
Common errors & fixes
pytest: error: unrecognized arguments: --explicit
pytest-explicit is not installed or not correctly installed in the current environment.
fix
Run `pip install pytest-explicit` and verify with `pip list | grep pytest-explicit`.
AttributeError: module 'pytest' has no attribute 'mark'
Using pytest.mark without importing pytest first, or running pytest incorrectly (e.g., with a different Python interpreter).
fix
Add `import pytest` at the top of your test file.
Failed: Could not load plugin 'pytest_explicit'
Conflicting pytest plugins or an outdated version of pytest-explicit.
fix
Upgrade pytest-explicit: `pip install --upgrade pytest-explicit`; if persists, reinstall with `pip install --force-reinstall pytest-explicit`.
Upgrade
Version history
1.0.1latest on PyPI · released Jun 15, 2021
Audit
Dependencies
pytestrequiredRequired plugin host
Agent activity
12 hits · last 30 days
node
10
Resources
pytest-explicit — pip install pytest-explicit · libregistry