Esempio n. 1
0
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")
    assert not main.is_python_file("file.pex")
Esempio n. 2
0
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)