diff options
author | gbrandl <devnull@localhost> | 2008-09-23 23:06:28 +0200 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2008-09-23 23:06:28 +0200 |
commit | a34d0680ec7181202ee5adb4bf185ff1ffc9e0ed (patch) | |
tree | 9eafc4f149b9a17216fd0d08e5e36ecbf5761335 /tests/support.py | |
parent | 6e735f945f1845566f9e5dbcf956b6d1c8f54916 (diff) | |
parent | 420f7fa8594b96d6eed23073f0525a431218bb3e (diff) | |
download | pygments-a34d0680ec7181202ee5adb4bf185ff1ffc9e0ed.tar.gz |
Merge with ben-file2open.
Diffstat (limited to 'tests/support.py')
-rw-r--r-- | tests/support.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/support.py b/tests/support.py new file mode 100644 index 00000000..67cf69d7 --- /dev/null +++ b/tests/support.py @@ -0,0 +1,15 @@ +# coding: utf-8 +""" +Support for Pygments tests +""" + +import os + + +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 = os.path.abspath(source) + return source, os.path.dirname(source) |