diff options
author | Ran Benita <ran@unusedvar.com> | 2019-12-02 21:16:15 +0200 |
---|---|---|
committer | Ran Benita <ran@unusedvar.com> | 2019-12-02 21:16:15 +0200 |
commit | d2d7b97a70c1e9dce9e2018c885a4e4203fadf64 (patch) | |
tree | e6c93cdc581ca56dedef8dd6a1d97a2e27d0e8a6 | |
parent | 277857b026fbc4a5150b0e75b14660a2768e6d74 (diff) | |
download | pytest-d2d7b97a70c1e9dce9e2018c885a4e4203fadf64.tar.gz |
Remove outdated py2py3 example
-rw-r--r-- | .pre-commit-config.yaml | 1 | ||||
-rw-r--r-- | doc/en/example/py2py3/conftest.py | 16 | ||||
-rw-r--r-- | doc/en/example/py2py3/test_py2.py | 5 | ||||
-rw-r--r-- | doc/en/example/py2py3/test_py3.py | 5 |
4 files changed, 0 insertions, 27 deletions
diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index c3c874ed2..bcab794c6 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,4 +1,3 @@ -exclude: doc/en/example/py2py3/test_py2.py repos: - repo: https://github.com/psf/black rev: 19.10b0 diff --git a/doc/en/example/py2py3/conftest.py b/doc/en/example/py2py3/conftest.py deleted file mode 100644 index 844510a25..000000000 --- a/doc/en/example/py2py3/conftest.py +++ /dev/null @@ -1,16 +0,0 @@ -import sys - -import pytest - -py3 = sys.version_info[0] >= 3 - - -class DummyCollector(pytest.collect.File): - def collect(self): - return [] - - -def pytest_pycollect_makemodule(path, parent): - bn = path.basename - if "py3" in bn and not py3 or ("py2" in bn and py3): - return DummyCollector(path, parent=parent) diff --git a/doc/en/example/py2py3/test_py2.py b/doc/en/example/py2py3/test_py2.py deleted file mode 100644 index 1f665086e..000000000 --- a/doc/en/example/py2py3/test_py2.py +++ /dev/null @@ -1,5 +0,0 @@ -def test_exception_syntax(): - try: - 0 / 0 - except ZeroDivisionError, e: - assert e diff --git a/doc/en/example/py2py3/test_py3.py b/doc/en/example/py2py3/test_py3.py deleted file mode 100644 index d95702a53..000000000 --- a/doc/en/example/py2py3/test_py3.py +++ /dev/null @@ -1,5 +0,0 @@ -def test_exception_syntax(): - try: - 0 / 0 - except ZeroDivisionError as e: - assert e |