blob: 6fef908846ddac75a328d150a99a5e3a9fe157c3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
|
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)
|