~ubuntu-branches/ubuntu/trusty/python-babel/trusty

« back to all changes in this revision

Viewing changes to conftest.py

  • Committer: Package Import Robot
  • Author(s): Chuck Short
  • Date: 2013-10-28 10:11:31 UTC
  • mfrom: (4.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20131028101131-zwbmm8sc29iemmlr
Tags: 1.3-2ubuntu1
* Merge from Debian unstable.  Remaining changes:
  - debian/rules: Run the testsuite during builds.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
import sys
 
2
from _pytest.doctest import DoctestModule
 
3
from py.path import local
 
4
 
 
5
 
 
6
PY2 = sys.version_info[0] < 3
 
7
 
 
8
 
 
9
collect_ignore = ['tests/messages/data']
 
10
 
 
11
 
 
12
def pytest_collect_file(path, parent):
 
13
    babel_path = local(__file__).dirpath().join('babel')
 
14
    config = parent.config
 
15
    if PY2:
 
16
        if babel_path.common(path) == babel_path:
 
17
            if path.ext == ".py":
 
18
                return DoctestModule(path, parent)