File: conftest.py

package info (click to toggle)
python-ratelimiter 1.2.0.post0-1
  • links: PTS, VCS
  • area: main
  • in suites: bullseye, buster
  • size: 140 kB
  • sloc: python: 208; makefile: 3
file content (18 lines) | stat: -rw-r--r-- 447 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# coding: utf-8
from __future__ import absolute_import, division, print_function

import sys

import pytest


class DummyCollector(pytest.collect.File):
    def collect(self):
        return []


def pytest_pycollect_makemodule(path, parent):
    # skip asyncio tests unless on Python 3.5+, because async/await
    # is a SyntaxError.
    if 'aio' in path.basename and sys.version_info < (3, 5):
        return DummyCollector(path, parent=parent)