* init, wip * time to test * remove unused dataclass * tests passing, just need to run in-game * fix wait logic * add threading lock, delete excess funcs * start putting best_match back in to search_and_wait() * bugfixes, found a bad template * scope * fix npc detect
19 lines
557 B
Python
19 lines
557 B
Python
import pytest
|
|
from logger import Logger
|
|
from utils.misc import load_template
|
|
|
|
|
|
class TestUtilsMisc:
|
|
def setup_method(self):
|
|
Logger.init()
|
|
Logger.remove_file_logger()
|
|
|
|
@pytest.mark.parametrize("path, should_be_success", [
|
|
("test/assets/hero_select.png", True),
|
|
("some/random/path/that/not/a/file.png", False),
|
|
])
|
|
def test_load_template(self, path: str, should_be_success: bool):
|
|
template_img = load_template(path)
|
|
success = template_img is not None
|
|
assert(success == should_be_success)
|