diff options
author | Ted Shaw <xiao.xj@gmail.com> | 2012-11-02 15:14:38 +0800 |
---|---|---|
committer | Ted Shaw <xiao.xj@gmail.com> | 2012-11-02 15:14:38 +0800 |
commit | d623dc4a583ec2dfb2b3679fb249d9e234e5c9bb (patch) | |
tree | 5e2ec4c74f26f5a69f1880573ca389881d1c4222 /tests/run.py | |
parent | ad3b11f1d0b178fca1a428e56be7ce8fd1262d62 (diff) | |
download | pygments-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.py | 3 |
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: |