Closed
Description
import os
def test_pytest():
name = os.getlogin()
assert name
print name
Running this as a test script fails with:
========================================== test session starts ===========================================
platform linux2 -- Python 2.7.9, pytest-2.8.2, py-1.4.30, pluggy-0.3.1
rootdir: /home/michael/workspace, inifile:
collected 1 items
test_pytest.py F
================================================ FAILURES ================================================
______________________________________________ test_pytest _______________________________________________
def test_pytest():
> name = os.getlogin()
E OSError: [Errno 25] Inappropriate ioctl for device
test_pytest.py:4: OSError
======================================== 1 failed in 0.00 seconds ========================================
Outside the test environment, within the same shell, this runs without error. Is this intended behaviour?
Metadata
Metadata
Assignees
Labels
No labels