1
0
mirror of https://github.com/scrapy/scrapy.git synced 2025-02-06 09:07:32 +00:00

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

This commit is contained in:
Emery Berger 2024-12-09 05:01:00 -05:00 committed by GitHub
parent cc146b9df7
commit 5680bee968
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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] != "#":