blob: 505c17da3b53eb07d1599a0d0a32988787ebeffb (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
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)
|