From e728828a3e475789a4bb85dab21380fcf5a2bbcf Mon Sep 17 00:00:00 2001 From: Kamil Date: Fri, 1 May 2020 01:17:50 +0200 Subject: [PATCH] Skipped windows incompatible tests --- tests/test_pybadges.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/tests/test_pybadges.py b/tests/test_pybadges.py index b85c1e5..3da2438 100644 --- a/tests/test_pybadges.py +++ b/tests/test_pybadges.py @@ -20,6 +20,7 @@ import json import os.path import unittest import pathlib +import sys import tempfile import xmldiff.main @@ -78,12 +79,14 @@ class TestEmbedImage(unittest.TestCase): 'expected an image, got "text"'): pybadges._embed_image('http://www.google.com/') + @unittest.skipIf(sys.platform.startswith("win"), "requires Unix filesystem") def test_svg_file_path(self): image_path = os.path.abspath( os.path.join(TEST_DIR, 'golden-images', 'build-failure.svg')) self.assertRegex(pybadges._embed_image(image_path), r'^data:image/svg(\+xml)?;base64,') + @unittest.skipIf(sys.platform.startswith("win"), "requires Unix filesystem") def test_png_file_path(self): with tempfile.NamedTemporaryFile() as png: png.write(PNG_IMAGE) @@ -91,6 +94,7 @@ class TestEmbedImage(unittest.TestCase): self.assertEqual(pybadges._embed_image(png.name), 'data:image/png;base64,' + PNG_IMAGE_B64) + @unittest.skipIf(sys.platform.startswith("win"), "requires Unix filesystem") def test_unknown_type_file_path(self): with tempfile.NamedTemporaryFile() as non_image: non_image.write(b'Hello') @@ -99,6 +103,7 @@ class TestEmbedImage(unittest.TestCase): 'not able to determine file type'): pybadges._embed_image(non_image.name) + @unittest.skipIf(sys.platform.startswith("win"), "requires Unix filesystem") def test_text_file_path(self): with tempfile.NamedTemporaryFile(suffix='.txt') as non_image: non_image.write(b'Hello')