From 558e5406e84026528b4ee3055d8dc9411819e1d7 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira Date: Wed, 16 Sep 2015 13:06:39 -0300 Subject: [PATCH] test_get_user should execute on windows only --- testing/test_tmpdir.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/testing/test_tmpdir.py b/testing/test_tmpdir.py index 2dc070bd6..b04c73583 100644 --- a/testing/test_tmpdir.py +++ b/testing/test_tmpdir.py @@ -1,3 +1,4 @@ +import sys import py import pytest @@ -135,9 +136,11 @@ def test_tmpdir_fallback_tox_env(testdir, monkeypatch): reprec.assertoutcome(passed=1) +@pytest.mark.skipif(not sys.platform.startswith('win'), reason='win only') def test_get_user(monkeypatch): """Test that get_user() function works even if environment variables - required by getpass module are missing from the environment (#1010). + required by getpass module are missing from the environment on Windows + (#1010). """ from _pytest.tmpdir import get_user monkeypatch.delenv('USER', raising=False)