summaryrefslogtreecommitdiff
path: root/tests/support.py
diff options
context:
space:
mode:
authorgbrandl <devnull@localhost>2008-09-23 23:09:12 +0200
committergbrandl <devnull@localhost>2008-09-23 23:09:12 +0200
commit4959be2bcacbfc1b32079b8c7487454416fb6329 (patch)
treeb7ac0d6acca32464aa43f74bec0846b19a9ab051 /tests/support.py
parenta34d0680ec7181202ee5adb4bf185ff1ffc9e0ed (diff)
downloadpygments-4959be2bcacbfc1b32079b8c7487454416fb6329.tar.gz
fix 2.3 compatibility.
Diffstat (limited to 'tests/support.py')
-rw-r--r--tests/support.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/tests/support.py b/tests/support.py
index 67cf69d7..505c17da 100644
--- a/tests/support.py
+++ b/tests/support.py
@@ -10,6 +10,6 @@ def location(mod_name):
"""
Return the file and directory that the code for *mod_name* is in.
"""
- source = mod_name[:-1] if mod_name.endswith("pyc") else mod_name
+ source = mod_name.endswith("pyc") and mod_name[:-1] or mod_name
source = os.path.abspath(source)
return source, os.path.dirname(source)