my.pdfs: reorganize tests a bit, fix mypy

This commit is contained in:
Dima Gerasimov 2021-03-30 20:44:49 +01:00 committed by karlicoss
parent 5c38872efc
commit e7604c188e
6 changed files with 23 additions and 17 deletions

View file

@ -1,4 +1,5 @@
import os
from pathlib import Path
import pytest
@ -18,3 +19,9 @@ def reset_modules() -> None:
to_unload = [m for m in sys.modules if re.match(r'my[.]?', m)]
for m in to_unload:
del sys.modules[m]
def testdata() -> Path:
d = Path(__file__).absolute().parent.parent / 'testdata'
assert d.exists(), d
return d