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
|
|
@ -2,6 +2,7 @@ from __future__ import annotations
|
|||
|
||||
import os.path
|
||||
import shutil
|
||||
import sys
|
||||
from typing import Any
|
||||
from unittest import mock
|
||||
|
||||
|
|
@ -198,7 +199,7 @@ def test_intermixed_stdout_stderr(tempdir_factory, store):
|
|||
)
|
||||
|
||||
|
||||
@pytest.mark.xfail(os.name == 'nt', reason='ptys are posix-only')
|
||||
@pytest.mark.xfail(sys.platform == 'win32', reason='ptys are posix-only')
|
||||
def test_output_isatty(tempdir_factory, store):
|
||||
_test_hook_repo(
|
||||
tempdir_factory, store, 'stdout_stderr_repo',
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue