From 05608acf7941f6057e7fb716c7962c3870debba2 Mon Sep 17 00:00:00 2001 From: Andrey Nikiforov Date: Sat, 7 Nov 2020 17:20:17 -0800 Subject: [PATCH] skip problematic tests on mac --- .gitignore | 2 ++ tests/test_download_photos.py | 6 ++++++ tests/test_logger.py | 2 ++ 3 files changed, 10 insertions(+) diff --git a/.gitignore b/.gitignore index d2242c05a..1257c40c1 100644 --- a/.gitignore +++ b/.gitignore @@ -14,3 +14,5 @@ __pycache__ .coverage.* htmlcov icloudpd-latest-py2.py3-none-any.whl +.venv +venv diff --git a/tests/test_download_photos.py b/tests/test_download_photos.py index e3986a524..464839dd1 100644 --- a/tests/test_download_photos.py +++ b/tests/test_download_photos.py @@ -108,6 +108,8 @@ def test_download_and_skip_existing_photos(self): @pytest.mark.skipif(sys.platform == 'win32', reason="does not run on windows -- wrong dates") + @pytest.mark.skipif(sys.platform == 'darwin', + reason="does not run on macos -- wrong dates") def test_download_photos_and_set_exif(self): base_dir = os.path.normpath("tests/fixtures/Photos") if os.path.exists(base_dir): @@ -935,6 +937,8 @@ def astimezone(self, tz=None): @pytest.mark.skipif(sys.platform == 'win32', reason="does not run on windows") + @pytest.mark.skipif(sys.platform == 'darwin', + reason="does not run on mac") def test_invalid_creation_year(self): base_dir = os.path.normpath("tests/fixtures/Photos") if os.path.exists(base_dir): @@ -1160,6 +1164,8 @@ def mocked_download(self, size): @pytest.mark.skipif(sys.platform == 'win32', reason="does not run on windows -- wrong dates") + @pytest.mark.skipif(sys.platform == 'darwin', + reason="does not run on macos -- wrong dates") def test_download_photos_and_set_exif_exceptions(self): base_dir = os.path.normpath("tests/fixtures/Photos") if os.path.exists(base_dir): diff --git a/tests/test_logger.py b/tests/test_logger.py index 1be48b418..a055ac2e8 100644 --- a/tests/test_logger.py +++ b/tests/test_logger.py @@ -12,6 +12,8 @@ class LoggerTestCase(TestCase): # Tests the formatter that is set up in setup_logger() @pytest.mark.skipif(sys.platform == 'win32', reason="does not run on windows -- wrong dates") + @pytest.mark.skipif(sys.platform == 'darwin', + reason="does not run on macos -- wrong dates") @freeze_time("2018-01-01 00:00") def test_logger_output(self): logger = setup_logger()