Skip to content

Commit

Permalink
Fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
tsterbak committed Mar 24, 2024
1 parent 1d842aa commit e0c6cab
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
1 change: 0 additions & 1 deletion openandroidinstaller/tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -604,7 +604,6 @@ def search_device(platform: str, bin_path: Path) -> SearchResult:
# "grep",
# "ro.product.device",
]
logger.info(f"Run command: {command}")
device_prop = check_output(
command,
stderr=STDOUT,
Expand Down
12 changes: 6 additions & 6 deletions tests/test_tooling.py
Original file line number Diff line number Diff line change
Expand Up @@ -62,18 +62,18 @@ def test_search_device_success(mocker):
)

# test linux
device_code = search_device(
search_result = search_device(
platform="linux", bin_path=Path("openandroidinstaller/bin/")
)

assert device_code == "sargo"
assert search_result.device_code == "sargo"

# test windows
device_code = search_device(
search_result = search_device(
platform="windows", bin_path=Path("openandroidinstaller/bin/")
)

assert device_code == "sargo"
assert search_result.device_code == "sargo"


def test_search_device_failure(mocker):
Expand All @@ -87,11 +87,11 @@ def patched_check_output(*args, **kwargs):
patched_check_output,
)

device_code = search_device(
search_result = search_device(
platform="linux", bin_path=Path("openandroidinstaller/bin/")
)

assert device_code is None
assert search_result.device_code is None


def test_run_command_success(mocker):
Expand Down

0 comments on commit e0c6cab

Please sign in to comment.