[malody] Add real file test case
This commit is contained in:
parent
54e1010cbe
commit
4c9eb6876e
@ -1,6 +1,6 @@
|
||||
# v1.2.1
|
||||
## Fixed
|
||||
- [malody] Parsing a malody file with keys that are unused for conversion
|
||||
- [malody] Parsing a file with keys that are unused for conversion
|
||||
(like `meta.mode_ext` or `extra`) would fire errors, not anymore !
|
||||
|
||||
# v1.2.0
|
||||
|
@ -1,4 +1,4 @@
|
||||
from hypothesis import given, reproduce_failure
|
||||
from hypothesis import given
|
||||
|
||||
from jubeatools import song
|
||||
from jubeatools.formats import Format
|
||||
|
0
jubeatools/formats/malody/tests/__init__.py
Normal file
0
jubeatools/formats/malody/tests/__init__.py
Normal file
2686
jubeatools/formats/malody/tests/data/1533908574.mc
Normal file
2686
jubeatools/formats/malody/tests/data/1533908574.mc
Normal file
File diff suppressed because it is too large
Load Diff
2
jubeatools/formats/malody/tests/data/__init__.py
Normal file
2
jubeatools/formats/malody/tests/data/__init__.py
Normal file
@ -0,0 +1,2 @@
|
||||
"""This file is here so the test code can use importlib as a portable way to
|
||||
open test data in this folder"""
|
19
jubeatools/formats/malody/tests/test_examples.py
Normal file
19
jubeatools/formats/malody/tests/test_examples.py
Normal file
@ -0,0 +1,19 @@
|
||||
from importlib import resources
|
||||
|
||||
from jubeatools.formats import LOADERS
|
||||
from jubeatools.formats.guess import guess_format
|
||||
|
||||
from . import data
|
||||
|
||||
|
||||
def try_to_load(example_file: str) -> None:
|
||||
with resources.path(data, example_file) as p:
|
||||
format_ = guess_format(p)
|
||||
loader = LOADERS[format_]
|
||||
_ = loader(p)
|
||||
|
||||
|
||||
def test_MilK() -> None:
|
||||
"""An actual malody chart will have may keys unspecified in the marshmallow
|
||||
schema, these should be ignored"""
|
||||
try_to_load("1533908574.mc")
|
Loading…
Reference in New Issue
Block a user