From 5c6c929e3a8e1fcf6115b0d81704ba0a7b6e2b61 Mon Sep 17 00:00:00 2001 From: Mark Bruning Date: Thu, 28 Sep 2023 10:15:25 -0500 Subject: [PATCH] Skip as_posix test except on windows --- tests/deploments/test_steps.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/deploments/test_steps.py b/tests/deploments/test_steps.py index a74c804b..a2312d18 100644 --- a/tests/deploments/test_steps.py +++ b/tests/deploments/test_steps.py @@ -1,4 +1,5 @@ import os +import sys from pathlib import Path, PurePath, PurePosixPath import boto3 @@ -46,8 +47,8 @@ def tmp_files_win(tmp_path: Path): "testfile1.txt", "testfile2.txt", "testfile3.txt", - "testdir1\\testfile4.txt", - "testdir2\\testfile5.txt", + r"testdir1\testfile4.txt", + r"testdir2\testfile5.txt", ] for file in files: @@ -95,6 +96,7 @@ def test_push_to_s3(s3_setup, tmp_files, mock_aws_credentials): assert set(object_keys) == set(expected_keys) +@pytest.mark.skipif(sys.platform != "win32", reason="requires Windows") def test_push_to_s3_as_posix(s3_setup, tmp_files_win, mock_aws_credentials): s3, bucket_name = s3_setup folder = "my-project"