summaryrefslogtreecommitdiff
path: root/tests/run.py
diff options
context:
space:
mode:
authorTed Shaw <xiao.xj@gmail.com>2012-11-02 15:14:38 +0800
committerTed Shaw <xiao.xj@gmail.com>2012-11-02 15:14:38 +0800
commitd623dc4a583ec2dfb2b3679fb249d9e234e5c9bb (patch)
tree5e2ec4c74f26f5a69f1880573ca389881d1c4222 /tests/run.py
parentad3b11f1d0b178fca1a428e56be7ce8fd1262d62 (diff)
downloadpygments-d623dc4a583ec2dfb2b3679fb249d9e234e5c9bb.tar.gz
os.path.dirname maybe empty on windows, and causes [Error 123] The filename, directory name, or volume label syntax is incorrect
Diffstat (limited to 'tests/run.py')
-rw-r--r--tests/run.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/tests/run.py b/tests/run.py
index ef92fe09..68303cdb 100644
--- a/tests/run.py
+++ b/tests/run.py
@@ -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: