summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKurt Neufeld <kneufeld@burgundywall.com>2016-06-02 15:52:02 -0700
committerKurt Neufeld <kneufeld@burgundywall.com>2016-06-02 15:52:02 -0700
commit2a887e582957ff231ad520099feeed4e162a37e3 (patch)
treef4f3cf12caa9469e5b5c23928e125dd9341c5c33
parent7654e964ef10b3a48d4d7d9452b8492ab29ae218 (diff)
downloadpygments-2a887e582957ff231ad520099feeed4e162a37e3.tar.gz
allow running of a single example file test...
set environment variable TEST_EXT to desired test file extension before running tests. eg. TEST_EXT=md nosetests tests/test_examplefiles.py
-rw-r--r--tests/test_examplefiles.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_examplefiles.py b/tests/test_examplefiles.py
index 924e1184..f43abf9b 100644
--- a/tests/test_examplefiles.py
+++ b/tests/test_examplefiles.py
@@ -46,6 +46,10 @@ def test_example_files():
if not os.path.isfile(absfn):
continue
+ extension = os.getenv('TEST_EXT')
+ if extension and not absfn.endswith(extension):
+ continue
+
print(absfn)
with open(absfn, 'rb') as f:
code = f.read()