Remove outdated py2py3 example
This commit is contained in:
parent
277857b026
commit
d2d7b97a70
|
@ -1,4 +1,3 @@
|
||||||
exclude: doc/en/example/py2py3/test_py2.py
|
|
||||||
repos:
|
repos:
|
||||||
- repo: https://github.com/psf/black
|
- repo: https://github.com/psf/black
|
||||||
rev: 19.10b0
|
rev: 19.10b0
|
||||||
|
|
|
@ -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)
|
|
|
@ -1,5 +0,0 @@
|
||||||
def test_exception_syntax():
|
|
||||||
try:
|
|
||||||
0 / 0
|
|
||||||
except ZeroDivisionError, e:
|
|
||||||
assert e
|
|
|
@ -1,5 +0,0 @@
|
||||||
def test_exception_syntax():
|
|
||||||
try:
|
|
||||||
0 / 0
|
|
||||||
except ZeroDivisionError as e:
|
|
||||||
assert e
|
|
Loading…
Reference in New Issue