testing/
: Add test case for missing balloons
This commit is contained in:
parent
9501058b38
commit
a979b4104a
@ -25,7 +25,7 @@ def convert(path_test, path_tja_tmp, entry_point, err_msg=None):
|
|||||||
if not err_msg:
|
if not err_msg:
|
||||||
api_convert(argv=[path_tja_tmp])
|
api_convert(argv=[path_tja_tmp])
|
||||||
else:
|
else:
|
||||||
with pytest.raises(ValueError) as e:
|
with pytest.raises(Exception) as e:
|
||||||
api_convert(argv=[path_tja_tmp])
|
api_convert(argv=[path_tja_tmp])
|
||||||
tb = "".join(traceback.format_tb(e.tb))
|
tb = "".join(traceback.format_tb(e.tb))
|
||||||
|
|
||||||
|
17
testing/data/dummy_tjas/missing_balloon.tja
Normal file
17
testing/data/dummy_tjas/missing_balloon.tja
Normal file
@ -0,0 +1,17 @@
|
|||||||
|
// This song is missing the `BALLOON:` metadata
|
||||||
|
BPM:120
|
||||||
|
OFFSET:-1.00
|
||||||
|
|
||||||
|
COURSE:Oni
|
||||||
|
LEVEL:10
|
||||||
|
BALLOON:
|
||||||
|
SCOREINIT:400
|
||||||
|
SCOREDIFF:100
|
||||||
|
|
||||||
|
#START
|
||||||
|
1020304,
|
||||||
|
5000008,
|
||||||
|
6000008,
|
||||||
|
7000008,
|
||||||
|
9000008,
|
||||||
|
#END
|
@ -7,7 +7,8 @@ from conftest import convert
|
|||||||
|
|
||||||
|
|
||||||
@pytest.mark.parametrize('id_song,err_msg', [
|
@pytest.mark.parametrize('id_song,err_msg', [
|
||||||
['basic_song', None]
|
['basic_song', None],
|
||||||
|
['missing_balloon', "Not enough values for 'BALLOON:"]
|
||||||
])
|
])
|
||||||
def test_expected_errors(id_song, err_msg, tmp_path, entry_point):
|
def test_expected_errors(id_song, err_msg, tmp_path, entry_point):
|
||||||
# Define the testing directory
|
# Define the testing directory
|
||||||
|
Loading…
x
Reference in New Issue
Block a user