fixes after change to src-layout

This commit is contained in:
scito
2022-12-30 15:31:41 +01:00
parent 3e4476e317
commit 144c9e6320
10 changed files with 63 additions and 21 deletions

11
tests/conftest.py Normal file
View File

@@ -0,0 +1,11 @@
import pytest
from typing import Any
def pytest_addoption(parser: pytest.Parser) -> None:
parser.addoption("--relaxed", action='store_true', help="run tests in relaxed mode")
@pytest.fixture
def relaxed(request: pytest.FixtureRequest) -> Any:
return request.config.getoption("--relaxed")

View File

@@ -39,7 +39,7 @@ Usage:
with Capturing() as output:
print("Output")
'''
# TODO remove type ignore when fixed, see https://github.com/python/mypy/issues/11871, https://stackoverflow.com/questions/72174409/type-hinting-the-return-value-of-a-class-method-that-returns-self
# TODO remove type ignore if fixed, see https://github.com/python/mypy/issues/11871, https://stackoverflow.com/questions/72174409/type-hinting-the-return-value-of-a-class-method-that-returns-self
def __enter__(self): # type: ignore
self._stdout = sys.stdout
sys.stdout = self._stringio_std = io.StringIO()