def test_simple_case(tmpdir): x = tmpdir.join('f') x.write('#!/usr/bin/env echo') make_executable(x.strpath) assert parse_shebang.parse_filename(x.strpath) == ('echo',)
def test_file_doesnt_exist(): assert parse_shebang.parse_filename('herp derp derp') == ()
def test_simple_case(tmpdir): x = tmpdir.join('f') x.write_text('#!/usr/bin/env python', encoding='UTF-8') make_executable(x.strpath) assert parse_shebang.parse_filename(x.strpath) == ('python',)
def test_simple_case(tmpdir): x = tmpdir.join('f') x.write_text('#!/usr/bin/env python', encoding='UTF-8') make_executable(x.strpath) assert parse_shebang.parse_filename(x.strpath) == ('python', )