From 2415d1bab53e72b188e308854b07cd09e4f32ad4 Mon Sep 17 00:00:00 2001 From: Emery Berger Date: Tue, 31 Dec 2024 11:38:19 -0500 Subject: [PATCH] Only test ScaleneAppleGPU on Darwin platforms (revised redux). --- tests/test_coverup_18.py | 2 +- tests/test_coverup_27.py | 2 +- tests/test_coverup_57.py | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/test_coverup_18.py b/tests/test_coverup_18.py index 15396f576..63c10ea77 100644 --- a/tests/test_coverup_18.py +++ b/tests/test_coverup_18.py @@ -10,7 +10,7 @@ import platform if platform.system() != "Darwin": - pytest.exit("This test only runs on Darwin platforms.", 0) + pytest.skip("This test only runs on Darwin platforms.") # Assuming the class ScaleneAppleGPU is defined elsewhere in the module from scalene.scalene_apple_gpu import ScaleneAppleGPU diff --git a/tests/test_coverup_27.py b/tests/test_coverup_27.py index f3fc45b63..fffe191b4 100644 --- a/tests/test_coverup_27.py +++ b/tests/test_coverup_27.py @@ -8,7 +8,7 @@ from unittest.mock import patch if platform.system() != "Darwin": - pytest.exit("This test only runs on Darwin platforms.", 0) + pytest.skip("This test only runs on Darwin platforms.") # Assuming the ScaleneAppleGPU class is in a module named scalene_apple_gpu from scalene.scalene_apple_gpu import ScaleneAppleGPU diff --git a/tests/test_coverup_57.py b/tests/test_coverup_57.py index f5870b4ef..c21e75b67 100644 --- a/tests/test_coverup_57.py +++ b/tests/test_coverup_57.py @@ -8,9 +8,9 @@ from unittest.mock import patch, MagicMock from typing import Tuple -if platform.system() != "Darwin": - pytest.exit("This test only runs on Darwin platforms.", 0) - +if platform.system() != "Darwin": + pytest.skip("This test only runs on Darwin platforms.") + from scalene.scalene_apple_gpu import ScaleneAppleGPU class MockedScaleneAppleGPU(ScaleneAppleGPU):