Skip to content

Scrapy, a fast high-level web crawling & scraping framework for Python.

Made path absolute to enable running pytest from a different directory. (#6567)

Emery Berger5680bee968d9
diff --git a/conftest.py b/conftest.py
index 3af072318..e9765962a 100644
--- a/conftest.py
+++ b/conftest.py
@@ -24,7 +24,9 @@ collect_ignore = [
*_py_files("tests/CrawlerRunner"),
]
-with Path("tests/ignores.txt").open(encoding="utf-8") as reader:
+base_dir = Path(__file__).parent
+ignore_file_path = base_dir / "tests" / "ignores.txt"
+with ignore_file_path.open(encoding="utf-8") as reader:
for line in reader:
file_path = line.strip()
if file_path and file_path[0] != "#":