mirror of
https://github.com/pre-commit/pre-commit.git
synced 2026-02-17 08:14:42 +04:00
prefer sys.platform over os.name when checking for windows OS
This commit is contained in:
parent
2822de9aa6
commit
5ce4a549d3
8 changed files with 13 additions and 10 deletions
|
|
@ -94,7 +94,7 @@ def test_normexe_does_not_exist_sep():
|
|||
assert excinfo.value.args == ('Executable `./i-dont-exist-lol` not found',)
|
||||
|
||||
|
||||
@pytest.mark.xfail(os.name == 'nt', reason='posix only')
|
||||
@pytest.mark.xfail(sys.platform == 'win32', reason='posix only')
|
||||
def test_normexe_not_executable(tmpdir): # pragma: win32 no cover
|
||||
tmpdir.join('exe').ensure()
|
||||
with tmpdir.as_cwd(), pytest.raises(OSError) as excinfo:
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue