From e7649065a2eaaa85433b992d54ac2a651568edee Mon Sep 17 00:00:00 2001 From: GeorgWa Date: Thu, 5 Oct 2023 11:06:16 +0200 Subject: [PATCH] updated pytest config --- tests/unit_tests/test_reporting.py | 14 ++++++-------- 1 file changed, 6 insertions(+), 8 deletions(-) diff --git a/tests/unit_tests/test_reporting.py b/tests/unit_tests/test_reporting.py index 45e456d6..983c7f3f 100644 --- a/tests/unit_tests/test_reporting.py +++ b/tests/unit_tests/test_reporting.py @@ -4,6 +4,8 @@ import os import logging import time +import sys +import pytest from alphadia.extraction.workflow import reporting @@ -15,6 +17,7 @@ def _random_tempfolder(): os.mkdir(path) return path +@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") def test_logging(): tempfolder = _random_tempfolder() @@ -37,8 +40,7 @@ def test_logging(): os.remove(os.path.join(tempfolder, "log.txt")) time.sleep(1) -test_logging() - +@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") def test_backend(): backend = reporting.Backend() @@ -84,8 +86,7 @@ def test_jsonl_backend(): os.remove(os.path.join(tempfolder, "events.jsonl")) time.sleep(1) -test_jsonl_backend() - +@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") def test_log_backend(): tempfolder = _random_tempfolder() @@ -106,8 +107,7 @@ def test_log_backend(): time.sleep(1) os.remove(os.path.join(tempfolder, "log.txt")) -test_log_backend() - +@pytest.mark.skipif(sys.platform == "win32", reason="does not run on windows") def test_pipeline(): tempfolder = _random_tempfolder() @@ -141,5 +141,3 @@ def test_pipeline(): # sleep 1 second to ensure that the file has been deleted time.sleep(1) - -test_pipeline() \ No newline at end of file