dosage/tests/conftest.py

21 lines
413 B
Python
Raw Normal View History

# SPDX-License-Identifier: MIT
# Copyright (C) 2019-2022 Tobias Gruetzmacher
2019-12-03 22:52:14 +00:00
import time
from pathlib import Path
2019-12-03 22:52:14 +00:00
import pytest
2020-04-18 11:03:02 +00:00
@pytest.fixture()
def _nosleep(monkeypatch):
2019-12-03 22:52:14 +00:00
def sleep(seconds):
pass
monkeypatch.setattr(time, 'sleep', sleep)
@pytest.fixture()
def _noappdirs(monkeypatch):
monkeypatch.setattr('dosagelib.cmd.user_plugin_path', Path(__file__).parent / 'mocks' / 'plugins')