Skip to content
This repository has been archived by the owner on Dec 27, 2024. It is now read-only.

Commit

Permalink
test(single-mode): add race menu test case
Browse files Browse the repository at this point in the history
  • Loading branch information
NateScarlet committed Aug 19, 2022
1 parent a2fe871 commit 207d67c
Show file tree
Hide file tree
Showing 4 changed files with 183 additions and 0 deletions.
3 changes: 3 additions & 0 deletions auto_derby/data/ocr_labels.csv
Original file line number Diff line number Diff line change
Expand Up @@ -1109,3 +1109,6 @@ f81ffc1ffe0f1e001f003f00ff1fff3f3e7f007c007800780c7c3e3efe1ff80f,5
380c3e1c0f380f380e383c3efc1ffc1f3e3c0ff807f007f007f01f7cfc1ff007,8
00600c618ee38ee38ee38ee38ee38ee38ee38ee38ee38ee38ee387e307e303e1,川
00080c1e0c7f0c7f0c77cc73cc7fcc7f0c700c601c6fff7fff7f3f7f017d0030,崎
00008023fc7f9c070c075c0ece1cce7efe7f007f003ffc3ffc276666fe7ffe7f,盛
fe7f7ffe3ffc33e477e6ffffffffc7e183e183e0c3e1e3e7e367037c03700020,岡
00001c00fe7ffc7ffc5dfe3cfe3c7c3c7c3cfe4cc74dc7fdce7dc61dce0dfe08,都
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
[
[
{
"stadium": "京都",
"name": "京都大賞典",
"grade": 200,
"ground": 1,
"distance": 2400,
"permission": 3,
"month": 10,
"half": 1,
"entryCount": 18,
"track": 3,
"turn": 1,
"targetStatuses": [
3
],
"minFanCount": 2000,
"fanCounts": [
6700,
2680,
1675,
1005,
670,
603,
536,
469,
402,
335,
268,
201,
168,
134,
101,
67,
67,
67
],
"gradePoints": [
80,
48,
32,
16,
16,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8,
8
],
"shopCoins": [
100,
60,
60,
30,
30,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"characters": []
},
[
203,
600
]
],
[
{
"stadium": "盛岡",
"name": "マイルチャンピオンシップ南部杯",
"grade": 100,
"ground": 2,
"distance": 1600,
"permission": 3,
"month": 10,
"half": 1,
"entryCount": 16,
"track": 1,
"turn": 2,
"targetStatuses": [
2,
5
],
"minFanCount": 12000,
"fanCounts": [
6000,
2400,
1500,
900,
600,
540,
480,
420,
360,
300,
240,
180,
150,
120,
90,
60,
60,
60
],
"gradePoints": [
100,
60,
40,
20,
20,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10,
10
],
"shopCoins": [
100,
60,
60,
30,
30,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0,
0
],
"characters": []
},
[
203,
715
]
]
]
9 changes: 9 additions & 0 deletions auto_derby/single_mode/race/race_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -313,6 +313,15 @@ def test_find_by_race_menu_image_11():
_test.snapshot_match(res)


def test_find_by_race_menu_image_12():
ctx = Context.new()
ctx.date = (2, 10, 1)
ctx.scenario = ctx.SCENARIO_CLIMAX
img, _ = _test.use_screenshot("single_mode/race_menu_12.png")
res = sorted(race.find_by_race_menu_image(ctx, img), key=lambda x: x[1][1])
_test.snapshot_match(res)


def test_find_by_race_menu_image_issue112():
ctx = Context.new()
ctx.date = (1, 12, 1)
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 207d67c

Please sign in to comment.