who cares
This commit is contained in:
27
tests/test_packlist.py
Normal file
27
tests/test_packlist.py
Normal file
@ -0,0 +1,27 @@
|
||||
import pytest
|
||||
|
||||
from arcaea_apk_assets.parsers.packlist import ArcaeaPacklistParser, PacklistFormatError
|
||||
from tests.contents import packlist as contents
|
||||
|
||||
|
||||
class TestPacklistParser:
|
||||
def test_normal(self):
|
||||
content = contents.NORMAL
|
||||
|
||||
ArcaeaPacklistParser.packs(content)
|
||||
|
||||
def test_malformed(self):
|
||||
with pytest.raises(PacklistFormatError, match="does not exist"):
|
||||
ArcaeaPacklistParser.items(contents.MALFORMED_WTF)
|
||||
|
||||
with pytest.raises(PacklistFormatError, match="got"):
|
||||
ArcaeaPacklistParser.items(contents.MALFORMED_ROOT)
|
||||
|
||||
assert (
|
||||
len(ArcaeaPacklistParser.items(contents.MALFORMED_WTF, skip_asserts=True))
|
||||
== 0
|
||||
)
|
||||
assert (
|
||||
len(ArcaeaPacklistParser.items(contents.MALFORMED_ROOT, skip_asserts=True))
|
||||
== 0
|
||||
)
|
Reference in New Issue
Block a user