Skip to content

Commit

Permalink
Removed debug statements
Browse files Browse the repository at this point in the history
  • Loading branch information
dmurphy18 authored and dwoz committed Aug 9, 2024
1 parent e1c1f9c commit 49292fb
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 15 deletions.
10 changes: 2 additions & 8 deletions src/pytestskipmarkers/utils/platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -111,15 +111,9 @@ def is_aarch64() -> bool:
"""
if is_darwin():
# Allow for MacOS Arm64 platform returning differently from Linux
# return platform.machine().startswith("arm64")
dgm_plmstrg = platform.machine()
print(f"DGM is_aarch64 with Darwin True, dgm_plmstrg '{dgm_plmstrg}'", flush=True)
return dgm_plmstrg.startswith("arm64")
return platform.machine().startswith("arm64")
else:
# return platform.machine().startswith("aarch64")
dgm_plmstrg = platform.machine()
print(f"DSGM is_aarch64 with Darwin False, dgm_plmstrg '{dgm_plmstrg}'", flush=True)
return dgm_plmstrg.startswith("aarch64")
return platform.machine().startswith("aarch64")


def is_photonos() -> bool:
Expand Down
7 changes: 0 additions & 7 deletions tests/unit/utils/test_platform.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,6 @@ def test_is_not_aix():

def test_is_aarch64_arm64():
return_value = True
print(f"DGM test_is_aarch64_arm64, expected return value '{return_value}'", flush=True)
# Allow for MacOS Arm64 platform returns 'arm64' not 'aarch64', different than Linux
with mock.patch("platform.machine", return_value="arm64"):
with mock.patch("sys.platform", new_callable=mock.PropertyMock(return_value="darwin")):
Expand All @@ -153,7 +152,6 @@ def test_is_aarch64_arm64():

def test_is_aarch64_aarch64():
return_value = True
print(f"DGM test_is_aarch64_aarch64, expected return value '{return_value}'", flush=True)
# Allow for MacOS Arm64 platform returns 'arm64' not 'aarch64', different than Linux
with mock.patch("platform.machine", return_value="aarch64"):
with mock.patch("sys.platform", new_callable=mock.PropertyMock(return_value="not_darwin")):
Expand All @@ -162,18 +160,13 @@ def test_is_aarch64_aarch64():

def test_is_not_aarch64():
return_value = False
print(f"DGM test_is_not_aarch64, expected return value '{return_value}'", flush=True)
with mock.patch("platform.machine", return_value="not_arm64"):
with mock.patch("sys.platform", new_callable=mock.PropertyMock(return_value="darwin")):
assert pytestskipmarkers.utils.platform.is_aarch64() is return_value


def test_is_not_aarch64_string_aarch64():
return_value = False
print(
f"DGM test_is_not_aarch64_string_aarch64, expected return value '{return_value}'",
flush=True,
)
with mock.patch("platform.machine", return_value="not_aarch64"):
assert pytestskipmarkers.utils.platform.is_aarch64() is return_value

Expand Down

0 comments on commit 49292fb

Please sign in to comment.