1
0
mirror of synced 2024-12-11 06:26:00 +01:00

[malody] Add real file test case

This commit is contained in:
Stepland 2021-05-28 01:53:36 +02:00
parent 54e1010cbe
commit 4c9eb6876e
7 changed files with 2709 additions and 2 deletions

View File

@ -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

View File

@ -1,4 +1,4 @@
from hypothesis import given, reproduce_failure
from hypothesis import given
from jubeatools import song
from jubeatools.formats import Format

File diff suppressed because it is too large Load Diff

View 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"""

View 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")