/
servlamo
/
POP
Обзор
Документация
Войти
/
servlamo
/
POP
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
master
tests/conftest.py
23 строки
491 B
Tyler Johnson
Fixed bugs in args signatures, more explicit loop handling, and pinned better reqs
23 ноя 2021, 09:54
Не верифицирован
23 ноя 2021, 09:54
1e5e855
Код
Авторство
О чём код?
import pathlib import sys import unittest.mock as mock import pytest @pytest.fixture(autouse=True, scope="session") def tpath(): code_dir = pathlib.Path(__file__).parent.parent.absolute() assert code_dir.exists() tpath_dir = code_dir / "tests" / "tpath" assert tpath_dir.exists() NEW_PATH = [str(code_dir), str(tpath_dir)] for p in sys.path: if p not in NEW_PATH: NEW_PATH.append(p) with mock.patch("sys.path", NEW_PATH): yield