mirror of
https://github.com/ok-oldking/ok-wuthering-waves.git
synced 2025-04-24 08:25:16 +00:00
33 lines
932 B
Python
33 lines
932 B
Python
import time
|
|
import unittest
|
|
from config import config
|
|
from ok.test.TaskTestCase import TaskTestCase
|
|
from src.task.AutoCombatTask import AutoCombatTask
|
|
from src.task.DailyTask import DailyTask
|
|
|
|
config['debug'] = True
|
|
|
|
|
|
class TestEcho(TaskTestCase):
|
|
task_class = DailyTask
|
|
config = config
|
|
|
|
def test_find_echo(self):
|
|
self.set_image('tests/images/echo.png')
|
|
echos = self.task.find_echos()
|
|
self.task.log_info('Found1 {} echos'.format(len(echos)))
|
|
self.assertEqual(1, len(echos))
|
|
time.sleep(1)
|
|
self.task.screenshot('echo1', show_box=True)
|
|
self.set_image('tests/images/echo2.png')
|
|
echos = self.task.find_echos()
|
|
self.task.log_info('Found2 {} echos'.format(len(echos)))
|
|
time.sleep(1)
|
|
self.task.screenshot('echo2', show_box=True)
|
|
self.assertEqual(1, len(echos))
|
|
time.sleep(1)
|
|
|
|
|
|
if __name__ == '__main__':
|
|
unittest.main()
|