prefer sys.platform over os.name when checking for windows OS

This commit is contained in:
marsha 2023-03-03 20:16:09 -06:00
parent 2822de9aa6
commit 5ce4a549d3
8 changed files with 13 additions and 10 deletions

View file

@ -187,7 +187,7 @@ def test_xargs_propagate_kwargs_to_cmd():
assert b'Pre commit is awesome' in stdout
@pytest.mark.xfail(os.name == 'nt', reason='posix only')
@pytest.mark.xfail(sys.platform == 'win32', reason='posix only')
def test_xargs_color_true_makes_tty():
retcode, out = xargs.xargs(
(sys.executable, '-c', 'import sys; print(sys.stdout.isatty())'),