diff --git a/SOURCES/README.md b/SOURCES/README.md new file mode 100644 index 0000000..03ea14f --- /dev/null +++ b/SOURCES/README.md @@ -0,0 +1,3 @@ +# python-pytest-forked + +The python-pytest-forked package \ No newline at end of file diff --git a/SOURCES/fix-pytest5-compatibility.patch b/SOURCES/fix-pytest5-compatibility.patch new file mode 100644 index 0000000..9b10c3b --- /dev/null +++ b/SOURCES/fix-pytest5-compatibility.patch @@ -0,0 +1,20 @@ +diff --git a/src/pytest_forked/__init__.py b/src/pytest_forked/__init__.py +index fa0600d..886c4c8 100644 +--- a/src/pytest_forked/__init__.py ++++ b/src/pytest_forked/__init__.py +@@ -71,13 +71,8 @@ def forked_run_report(item): + + + def report_process_crash(item, result): +- try: +- from _pytest.compat import getfslineno +- except ImportError: +- # pytest<4.2 +- path, lineno = item._getfslineno() +- else: +- path, lineno = getfslineno(item) ++ from _pytest._code.source import getfslineno ++ path, lineno = getfslineno(item) + info = ("%s:%s: running the test CRASHED with signal %d" % + (path, lineno, result.signal)) + from _pytest import runner