diff --git a/comicapi/comicarchive.py b/comicapi/comicarchive.py index 18e0eb4..b0c2be2 100644 --- a/comicapi/comicarchive.py +++ b/comicapi/comicarchive.py @@ -102,6 +102,7 @@ class ComicArchive: self.archiver: Archiver = UnknownArchiver.open(self.path) + load_archive_plugins() for archiver in archivers: if archiver.is_valid(self.path): self.archiver = archiver.open(self.path) diff --git a/comictaggerlib/main.py b/comictaggerlib/main.py index 7299914..e0dfb14 100644 --- a/comictaggerlib/main.py +++ b/comictaggerlib/main.py @@ -161,8 +161,6 @@ class App: True, ) - comicapi.comicarchive.load_archive_plugins() - if self.options[0].runtime_no_gui: if error and error[1]: print(f"A fatal error occurred please check the log for more information: {error[0]}") # noqa: T201 diff --git a/tests/comicarchive_test.py b/tests/comicarchive_test.py index 2c939fe..e0949aa 100644 --- a/tests/comicarchive_test.py +++ b/tests/comicarchive_test.py @@ -12,7 +12,7 @@ from testing.filenames import datadir @pytest.mark.xfail(not comicapi.archivers.rar.rar_support, reason="rar support") -def test_getPageNameList(load_archive_plugins): +def test_getPageNameList(): c = comicapi.comicarchive.ComicArchive(datadir / "fake_cbr.cbr") assert c.seems_to_be_a_comic_archive() pageNameList = c.get_page_name_list() diff --git a/tests/conftest.py b/tests/conftest.py index 89fd3d7..7b20081 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -23,17 +23,12 @@ from testing.comicdata import all_seed_imprints, seed_imprints @pytest.fixture -def cbz(load_archive_plugins): +def cbz(): yield comicapi.comicarchive.ComicArchive(filenames.cbz_path) @pytest.fixture -def load_archive_plugins(): - comicapi.comicarchive.load_archive_plugins() - - -@pytest.fixture -def tmp_comic(tmp_path, load_archive_plugins): +def tmp_comic(tmp_path): shutil.copy(filenames.cbz_path, tmp_path) yield comicapi.comicarchive.ComicArchive(tmp_path / filenames.cbz_path.name)