vdirsyncer/tests/conftest.py
2016-01-24 19:35:37 +01:00

29 lines
549 B
Python

# -*- coding: utf-8 -*-
'''
General-purpose fixtures for vdirsyncer's testsuite.
'''
import logging
import click_log
import pytest
@pytest.fixture(autouse=True)
def setup_logging():
click_log.basic_config('vdirsyncer').setLevel(logging.DEBUG)
@pytest.fixture(autouse=True)
def suppress_py2_warning(monkeypatch):
monkeypatch.setattr('vdirsyncer.cli._check_python2', lambda: None)
try:
import pytest_benchmark
except ImportError:
@pytest.fixture
def benchmark():
return lambda x: x()
else:
del pytest_benchmark