Skip to content

Commit 718ee79

Browse files
committed
test: fix test cases
1 parent 0d56cfd commit 718ee79

File tree

2 files changed

+6
-6
lines changed

2 files changed

+6
-6
lines changed

docs/examples.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -97,10 +97,10 @@ async def test_scores_fetching_lxns(maimai: MaimaiClient, lxns: LXNSProvider, lx
9797

9898
preview = await maimai.minfo(1231, PlayerIdentifier(friend_code=664994421382429), provider=lxns)
9999
assert preview is not None
100-
assert all(score.id == preview.song.id for score in preview.scores)
100+
assert all((score.id % 10000) == preview.song.id for score in preview.scores)
101101

102102
for song, diff, score in await my_scores.get_mapping():
103-
assert song.id == score.id and diff.type == score.type and diff.level_index == score.level_index
103+
assert song.id == (score.id % 10000) and diff.type == score.type and diff.level_index == score.level_index
104104

105105

106106
@pytest.mark.asyncio(scope="session")
@@ -116,7 +116,7 @@ async def test_scores_fetching_divingfish(maimai: MaimaiClient, divingfish: Divi
116116

117117
preview = await maimai.minfo(1231, PlayerIdentifier(username="turou"), provider=divingfish)
118118
assert preview is not None
119-
assert all(score.id == preview.song.id for score in preview.scores)
119+
assert all((score.id % 10000) == preview.song.id for score in preview.scores)
120120

121121

122122
@pytest.mark.asyncio(scope="session")

tests/test_scores.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,10 +22,10 @@ async def test_scores_fetching_lxns(maimai: MaimaiClient, lxns: LXNSProvider, lx
2222

2323
preview = await maimai.minfo(1231, PlayerIdentifier(friend_code=664994421382429), provider=lxns)
2424
assert preview is not None
25-
assert all(score.id == preview.song.id for score in preview.scores)
25+
assert all((score.id % 10000) == preview.song.id for score in preview.scores)
2626

2727
for song, diff, score in await my_scores.get_mapping():
28-
assert song.id == score.id and diff.type == score.type and diff.level_index == score.level_index
28+
assert song.id == (score.id % 10000) and diff.type == score.type and diff.level_index == score.level_index
2929

3030

3131
@pytest.mark.asyncio(scope="session")
@@ -41,7 +41,7 @@ async def test_scores_fetching_divingfish(maimai: MaimaiClient, divingfish: Divi
4141

4242
preview = await maimai.minfo("1231", PlayerIdentifier(username="turou"), provider=divingfish)
4343
assert preview is not None
44-
assert all(score.id == preview.song.id for score in preview.scores)
44+
assert all((score.id % 10000) == preview.song.id for score in preview.scores)
4545

4646

4747
@pytest.mark.asyncio(scope="session")

0 commit comments

Comments
 (0)