Fix issue with .7z archives

Before, only fandom wikis dumps were compressed with .7z.
These archives can have several .xml files in the .7z; not just one.
So we need to have a flag for the fandom-2020 dumps.

This fixes the bug so .7z archives work in either case.
This commit is contained in:
Nathan TeBlunthuis
2025-05-28 21:31:41 -07:00
parent 39fec0820d
commit 2a2b611d79
3 changed files with 19 additions and 11 deletions

View File

@@ -148,7 +148,7 @@ class WikiqTestCase(unittest.TestCase):
tester = WikiqTester(SAILORMOON, "collapse-user", in_compression="7z")
try:
tester.call_wikiq("--collapse-user")
tester.call_wikiq("--collapse-user --fandom-2020")
except subprocess.CalledProcessError as exc:
self.fail(exc.stderr.decode("utf8"))
@@ -162,7 +162,7 @@ class WikiqTestCase(unittest.TestCase):
tester = WikiqTester(SAILORMOON, "persistence_segment", in_compression="7z")
try:
tester.call_wikiq("--persistence segment")
tester.call_wikiq("--persistence segment --fandom-2020")
except subprocess.CalledProcessError as exc:
self.fail(exc.stderr.decode("utf8"))
@@ -176,7 +176,7 @@ class WikiqTestCase(unittest.TestCase):
tester = WikiqTester(SAILORMOON, "persistence_legacy", in_compression="7z")
try:
tester.call_wikiq("--persistence legacy")
tester.call_wikiq("--persistence legacy --fandom-2020")
except subprocess.CalledProcessError as exc:
self.fail(exc.stderr.decode("utf8"))
@@ -190,7 +190,7 @@ class WikiqTestCase(unittest.TestCase):
tester = WikiqTester(SAILORMOON, "persistence", in_compression="7z")
try:
tester.call_wikiq("--persistence")
tester.call_wikiq("--persistence --fandom-2020")
except subprocess.CalledProcessError as exc:
self.fail(exc.stderr.decode("utf8"))
@@ -206,7 +206,7 @@ class WikiqTestCase(unittest.TestCase):
tester = WikiqTester(SAILORMOON, "url-encode", in_compression="7z")
try:
tester.call_wikiq("--url-encode")
tester.call_wikiq("--url-encode --fandom-2020")
except subprocess.CalledProcessError as exc:
self.fail(exc.stderr.decode("utf8"))
@@ -233,7 +233,7 @@ class WikiqTestCase(unittest.TestCase):
tester = WikiqTester(wiki=SAILORMOON, case_name="noargs", in_compression="7z")
try:
outs = tester.call_wikiq( "--stdout", out=False).decode("utf8")
outs = tester.call_wikiq( "--stdout --fandom-2020", out=False).decode("utf8")
except subprocess.CalledProcessError as exc:
self.fail(exc.stderr.decode("utf8"))