File: conftest.py

package info (click to toggle)
python-babel 1.3%2Bdfsg.1-5
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 69,060 kB
  • ctags: 1,644
  • sloc: xml: 582,663; python: 9,389; makefile: 216; sh: 188
file content (18 lines) | stat: -rw-r--r-- 426 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
import sys
from _pytest.doctest import DoctestModule
from py.path import local


PY2 = sys.version_info[0] < 3


collect_ignore = ['tests/messages/data']


def pytest_collect_file(path, parent):
    babel_path = local(__file__).dirpath().join('babel')
    config = parent.config
    if PY2:
        if babel_path.common(path) == babel_path:
            if path.ext == ".py":
                return DoctestModule(path, parent)