1
0
mirror of synced 2025-01-23 14:52:06 +01:00

testing/: Add test case for missing balloons

This commit is contained in:
Viv 2023-07-23 11:23:51 -04:00
parent 9501058b38
commit a979b4104a
3 changed files with 20 additions and 2 deletions

View File

@ -25,7 +25,7 @@ def convert(path_test, path_tja_tmp, entry_point, err_msg=None):
if not err_msg:
api_convert(argv=[path_tja_tmp])
else:
with pytest.raises(ValueError) as e:
with pytest.raises(Exception) as e:
api_convert(argv=[path_tja_tmp])
tb = "".join(traceback.format_tb(e.tb))

View 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

View File

@ -7,7 +7,8 @@ from conftest import convert
@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):
# Define the testing directory