File: conftest.py

package info (click to toggle)
python-tempora 5.7.0-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid, trixie
  • size: 240 kB
  • sloc: python: 636; sh: 12; makefile: 7
file content (17 lines) | stat: -rw-r--r-- 429 bytes parent folder | download | duplicates (3)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
import sys
import operator


def pytest_collection_modifyitems(session, config, items):
    remove_parse_timedelta(items)


def remove_parse_timedelta(items):  # pragma: nocover
    """
    Repr on older Pythons is different, so remove the offending
    test.
    """
    if sys.version_info > (3, 7):
        return
    names = list(map(operator.attrgetter('name'), items))
    del items[names.index('tempora.parse_timedelta')]