-
-
Notifications
You must be signed in to change notification settings - Fork 587
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
4384bc0
commit 70c904d
Showing
1 changed file
with
8 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) | ||
|
||
|
||
|