From 70c904d8c951df3faaa8ee3573c8bb9eb7203814 Mon Sep 17 00:00:00 2001 From: Timothy Crosley Date: Tue, 7 Jan 2020 10:58:07 -0800 Subject: Only test fifo on unix systems --- tests/test_main.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/tests/test_main.py b/tests/test_main.py index b3e50b54..300108a0 100644 --- a/tests/test_main.py +++ b/tests/test_main.py @@ -1,17 +1,21 @@ import os +import sys + +import pytest + from isort import main -def test_is_python_file(tmpdir): +def test_is_python_file(): assert main.is_python_file("file.py") assert main.is_python_file("file.pyi") assert main.is_python_file("file.pyx") assert not main.is_python_file("file.pyc") assert not main.is_python_file("file.txt") + +@pytest.mark.skipif(sys.platform == "win32", reason="cannot create fifo file on Windows platform") +def test_is_python_file_fifo(tmpdir): fifo_file = os.path.join(tmpdir, "fifo_file") os.mkfifo(fifo_file) assert not main.is_python_file(fifo_file) - - - -- cgit v1.2.1