diff options
author | gbrandl <devnull@localhost> | 2008-09-24 18:14:55 +0200 |
---|---|---|
committer | gbrandl <devnull@localhost> | 2008-09-24 18:14:55 +0200 |
commit | 938060f2faccba4abbae4c298e93a537296cf89c (patch) | |
tree | 3422585d35ab955c5859be0f9d460f4ecc195eb6 /tests/support.py | |
parent | d0634d959bb52e1378cf866acc53df731e069b17 (diff) | |
parent | d2e1a6638b3746142537e224b06fd842475798d0 (diff) | |
download | pygments-938060f2faccba4abbae4c298e93a537296cf89c.tar.gz |
Merge with Tim.
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..505c17da --- /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.endswith("pyc") and mod_name[:-1] or mod_name + source = os.path.abspath(source) + return source, os.path.dirname(source) |