diff options
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) |