File: support.py

package info (click to toggle)
pygments 2.0.1%2Bdfsg-1.1%2Bdeb8u1
  • links: PTS, VCS
  • area: main
  • in suites: jessie
  • size: 3,856 kB
  • ctags: 4,394
  • sloc: python: 56,341; makefile: 211; sh: 95
file content (17 lines) | stat: -rw-r--r-- 349 bytes parent folder | download | duplicates (5)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
# coding: utf-8
"""
Support for Pygments tests
"""

import os

from nose import SkipTest


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)