-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathtest_android_here.py
More file actions
32 lines (20 loc) · 860 Bytes
/
Copy pathtest_android_here.py
File metadata and controls
32 lines (20 loc) · 860 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
import pytest
@pytest.mark.parametrize(
"script",
(None, "test.py"),
)
def test_restart_app(mocked_android_modules, app_instance, test_py_script, script):
from android_here import restart_app
restart_app(script)
def test_script_path_resolved(mocked_android_modules, app_instance, test_py_script):
from android_here import resolve_script_path
path = resolve_script_path("test.py")
assert path.startswith("/") and path.endswith("test.py")
def test_absolute_script_path_resolved(
mocked_android_modules, app_instance, test_py_script
):
from android_here import resolve_script_path
assert resolve_script_path(test_py_script) == test_py_script
def test_pin_shortcut(mocker, mocked_android_modules, app_instance, test_py_script):
from android_here import pin_shortcut
pin_shortcut("test.py", "test label")