pytest-mark-no-py3
This package provides a pytest plugin and a Bowler codemod to help migrate tests to Python 3.
Any tests marked with @pytest.mark.no_py3 will be expected to fail when
running on Python 3 and will fail the test if they pass unexpectedly.
Usage
Adding @pytest.mark.no_py3
-
Install this package in your test dependencies.
-
Run your tests on Python 3, savings the results with pytest's
--result-logoption, e.g.:tox -e py37 -- --result-log=test-results.txt
-
Install this package with the
bowlerextras in a Python 3 virtualenv:pip install pytest_mark_no_py3[bowler]
-
Apply the marker to all of the tests that failed on Python 3, running from the same directory that you ran the tests from:
python -m pytest_mark_no_py3.add --result-log=path/to/result-log.txt path/to/your/tests
If you're feeling confident, you can also use the
--no-interactiveoption to apply the codemod without prompting to accept changes.
Removing @pytest.mark.no_py3
-
Fix some code so that tests start passing on Python 3, violating the xfail.
-
Run your tests on Python 3, savings the results with pytest's
--result-logoption, e.g.:tox -e py37 -- --result-log=test-results.txt
Warning: The only failing tests should be the tests that you fixed and want the marker removed from!
-
Install this package with the
bowlerextras in a Python 3 virtualenv:pip install pytest_mark_no_py3[bowler]
-
Remove the marker from all of the tests that "failed" (i.e. were expected to fail but actually passed) on Python 3, running from the same directory that you ran the tests from:
python -m pytest_mark_no_py3.remove --result-log=path/to/result-log.txt path/to/your/tests
If you're feeling confident, you can also use the
--no-interactiveoption to apply the codemod without prompting to accept changes.
Running tests
Run tox.
Release files for pytest-mark-no-py3 0.1.0
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-mark-no-py3-0.1.0.tar.gz | 6.3 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| pytest_mark_no_py3-0.1.0-py2.py3-none-any.whl | Python 2, Python 3 | none | any | Details |
Total release size: 12.7 kB
Release files / pytest-mark-no-py3-0.1.0.tar.gz
| Download URL | pytest-mark-no-py3-0.1.0.tar.gz |
|---|---|
| Size | 6.3 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
f32931c2316f5b8a1eda33c54f31e824da01ff3f733c3010e2b5e9190412402d
|
|
BLAKE2b-256 checksum How to use checksums |
c714a48c0a66ddd4abe441a0cd8f4768da21c3e309a5a2782b74873c33836580
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
|
Release files / pytest_mark_no_py3-0.1.0-py2.py3-none-any.whl
| Download URL | pytest_mark_no_py3-0.1.0-py2.py3-none-any.whl |
|---|---|
| Size | 6.4 kB |
| Tags | Python 2 Python 3 |
|
SHA-256 checksum How to use checksums |
fd0a68bc478f04f99d9080d4459439389f11809f6f6a472647d161443b57e2fd
|
|
BLAKE2b-256 checksum How to use checksums |
016ce44dd96db1d45c7b6511b0a097d707259798df536bae223c842a54545644
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/1.12.1 pkginfo/1.4.2 requests/2.20.0 setuptools/40.5.0 requests-toolbelt/0.8.0 tqdm/4.28.1 CPython/3.7.3
|