From 5ea4a72b8eecdae6a2ed29adbbc96df9987509ef Mon Sep 17 00:00:00 2001 From: klangner Date: Mon, 9 Feb 2015 10:28:22 +0100 Subject: [PATCH] py3-ignores.txt supports comments --- .gitignore | 2 ++ conftest.py | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/.gitignore b/.gitignore index 4eb80012f..97535ccaf 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,5 @@ +/.vagrant +/scrapy.iml *.pyc _trial_temp* dropin.cache diff --git a/conftest.py b/conftest.py index aa27ddd2b..1c221491e 100644 --- a/conftest.py +++ b/conftest.py @@ -9,9 +9,10 @@ if 'django' not in optional_features: collect_ignore.append("tests/test_djangoitem/models.py") if six.PY3: - for fn in open('tests/py3-ignores.txt'): - if fn.strip(): - collect_ignore.append(fn.strip()) + for line in open('tests/py3-ignores.txt'): + filePath = line.strip() + if len(filePath) > 0 and filePath[0] != '#': + collect_ignore.append(filePath) class LogObservers: """Class for keeping track of log observers across test modules"""