-
Notifications
You must be signed in to change notification settings - Fork 109
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(team-race): update template for adb device
fix #144
- Loading branch information
1 parent
4ff2808
commit 2f265db
Showing
5 changed files
with
22 additions
and
0 deletions.
There are no files selected for viewing
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
from auto_derby import mathtools | ||
from . import _test | ||
from .. import template, templates | ||
|
||
|
||
_EXPECTED_POS = (240, 154) | ||
|
||
|
||
def test_match(): | ||
img, rp = _test.use_screenshot("team_race_arena.png") | ||
res = tuple(template.match(img, templates.TEAM_RACE_CHOOSE_COMPETITOR)) | ||
assert len(res) == 1 | ||
(match1,) = res | ||
assert match1[1] == rp.vector2(_EXPECTED_POS, 540) | ||
|
||
|
||
def test_match_issue135(): | ||
img, rp = _test.use_screenshot("team_race_arena_issue144.png") | ||
res = tuple(template.match(img, templates.TEAM_RACE_CHOOSE_COMPETITOR)) | ||
assert len(res) == 1 | ||
(match1,) = res | ||
assert mathtools.distance(match1[1], rp.vector2(_EXPECTED_POS, 540)) < 8 |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.