pdfs: migrate config to Protocol with properties

allowes to remove a whole bunch of hacky crap from tests!
This commit is contained in:
Dima Gerasimov 2024-08-23 00:47:00 +01:00
parent 660d2d9fe9
commit 7331f98efe
3 changed files with 56 additions and 64 deletions

View file

@ -20,6 +20,10 @@ def reset_modules() -> None:
'''
to_unload = [m for m in sys.modules if re.match(r'my[.]?', m)]
for m in to_unload:
if 'my.pdfs' in m:
# temporary hack -- since my.pdfs migrated to a 'lazy' config, this isn't necessary anymore
# but if we reset module anyway, it confuses the ProcessPool inside my.pdfs
continue
del sys.modules[m]