summaryrefslogtreecommitdiff
path: root/tests/run.py
diff options
context:
space:
mode:
authorAndy Li <andy@onthewings.net>2013-02-19 02:30:44 +0800
committerAndy Li <andy@onthewings.net>2013-02-19 02:30:44 +0800
commit565a8ec40162f20a004b826ad339c655f696b45e (patch)
treea4ba4fe5b8874e3305941613034e6f6548bdb6a9 /tests/run.py
parent25273ed077997a0ed8ca8bcf34be7b94e248c5cb (diff)
parent054c464c70c115f476608a51bb0b4a931d1fa400 (diff)
downloadpygments-565a8ec40162f20a004b826ad339c655f696b45e.tar.gz
Merge upstream changes.
Diffstat (limited to 'tests/run.py')
-rw-r--r--tests/run.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/tests/run.py b/tests/run.py
index ef92fe09..18a1d824 100644
--- a/tests/run.py
+++ b/tests/run.py
@@ -8,7 +8,7 @@
python run.py [testfile ...]
- :copyright: Copyright 2006-2012 by the Pygments team, see AUTHORS.
+ :copyright: Copyright 2006-2013 by the Pygments team, see AUTHORS.
:license: BSD, see LICENSE for details.
"""
@@ -25,7 +25,8 @@ if sys.version_info >= (3,):
os.chdir(newroot)
else:
# only find tests in this directory
- os.chdir(os.path.dirname(__file__))
+ if os.path.dirname(__file__):
+ os.chdir(os.path.dirname(__file__))
try: