test_get_user should execute on windows only
This commit is contained in:
parent
1150e87e31
commit
558e5406e8
|
@ -1,3 +1,4 @@
|
||||||
|
import sys
|
||||||
import py
|
import py
|
||||||
import pytest
|
import pytest
|
||||||
|
|
||||||
|
@ -135,9 +136,11 @@ def test_tmpdir_fallback_tox_env(testdir, monkeypatch):
|
||||||
reprec.assertoutcome(passed=1)
|
reprec.assertoutcome(passed=1)
|
||||||
|
|
||||||
|
|
||||||
|
@pytest.mark.skipif(not sys.platform.startswith('win'), reason='win only')
|
||||||
def test_get_user(monkeypatch):
|
def test_get_user(monkeypatch):
|
||||||
"""Test that get_user() function works even if environment variables
|
"""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
|
from _pytest.tmpdir import get_user
|
||||||
monkeypatch.delenv('USER', raising=False)
|
monkeypatch.delenv('USER', raising=False)
|
||||||
|
|
Loading…
Reference in New Issue