-
-
Notifications
You must be signed in to change notification settings - Fork 3k
Closed
Labels
type: bugproblem that needs to be addressedproblem that needs to be addressed
Description
Originally reported by: Arfrever Frehtes Taifersar Arahesis (BitBucket: arfrever, GitHub: arfrever)
test_cmdline_python_package() from testing/acceptance_test.py fails at least with CPython 2.6 and 2.7. It passes with CPython 3.1 and 3.2.
$ py.test-2.7 testing/acceptance_test.py
==================================================================== test session starts ====================================================================
platform linux2 -- Python 2.7.3 -- pytest-2.1.2
collected 38 items
testing/acceptance_test.py ..................................F.x.
========================================================================= FAILURES ==========================================================================
____________________________________________________ TestInvocationVariants.test_cmdline_python_package _____________________________________________________
self = <acceptance_test.TestInvocationVariants instance at 0x2da3098>
testdir = <TmpTestdir local('/tmp/pytest-0/testdir/test_cmdline_python_package0/test_cmdline_python_package')>
monkeypatch = <_pytest.monkeypatch.monkeypatch instance at 0x2da3320>
def test_cmdline_python_package(self, testdir, monkeypatch):
monkeypatch.delenv('PYTHONDONTWRITEBYTECODE', False)
path = testdir.mkpydir("tpkg")
path.join("test_hello.py").write("def test_hello(): pass")
path.join("test_world.py").write("def test_world(): pass")
result = testdir.runpytest("--pyargs", "tpkg")
assert result.ret == 0
result.stdout.fnmatch_lines([
"*2 passed*"
])
result = testdir.runpytest("--pyargs", "tpkg.test_hello")
assert result.ret == 0
result.stdout.fnmatch_lines([
"*1 passed*"
])
result = testdir.runpytest("--pyargs", ".")
assert result.ret == 0
result.stdout.fnmatch_lines([
> "*2 passed*"
E Failed: remains unmatched: '*2 passed*', see stderr
/tmp/pytest-2.1.2/testing/acceptance_test.py:409: Failed
---------------------------------------------------------------------- Captured stdout ----------------------------------------------------------------------
running ['/usr/bin/python2.7', '/usr/lib64/python2.7/site-packages/pytest.py', '--basetemp=/tmp/pytest-0/testdir/test_cmdline_python_package0/test_cmdline_python_package/runpytest-0', '--pyargs', 'tpkg'] curdir= /tmp/pytest-0/testdir/test_cmdline_python_package0/test_cmdline_python_package
============================= test session starts ==============================
platform linux2 -- Python 2.7.3 -- pytest-2.1.2
collecting ... collected 2 items
tpkg/test_hello.py .
tpkg/test_world.py .
=========================== 2 passed in 0.02 seconds ===========================
running ['/usr/bin/python2.7', '/usr/lib64/python2.7/site-packages/pytest.py', '--basetemp=/tmp/pytest-0/testdir/test_cmdline_python_package0/test_cmdline_python_package/runpytest-1', '--pyargs', 'tpkg.test_hello'] curdir= /tmp/pytest-0/testdir/test_cmdline_python_package0/test_cmdline_python_package
============================= test session starts ==============================
platform linux2 -- Python 2.7.3 -- pytest-2.1.2
collecting ... collected 1 items
tpkg/test_hello.py .
=========================== 1 passed in 0.01 seconds ===========================
running ['/usr/bin/python2.7', '/usr/lib64/python2.7/site-packages/pytest.py', '--basetemp=/tmp/pytest-0/testdir/test_cmdline_python_package0/test_cmdline_python_package/runpytest-2', '--pyargs', '.'] curdir= /tmp/pytest-0/testdir/test_cmdline_python_package0/test_cmdline_python_package
============================= test session starts ==============================
platform linux2 -- Python 2.7.3 -- pytest-2.1.2
collecting ... collected 0 items
=============================== in 0.17 seconds ===============================
---------------------------------------------------------------------- Captured stderr ----------------------------------------------------------------------
nomatch: '*2 passed*'
and: u'============================= test session starts =============================='
and: u'platform linux2 -- Python 2.7.3 -- pytest-2.1.2'
and: u'collecting ... collected 2 items'
and: u''
and: u'tpkg/test_hello.py .'
and: u'tpkg/test_world.py .'
and: u''
fnmatch: '*2 passed*'
with: u'=========================== 2 passed in 0.02 seconds ==========================='
nomatch: '*1 passed*'
and: u'============================= test session starts =============================='
and: u'platform linux2 -- Python 2.7.3 -- pytest-2.1.2'
and: u'collecting ... collected 1 items'
and: u''
and: u'tpkg/test_hello.py .'
and: u''
fnmatch: '*1 passed*'
with: u'=========================== 1 passed in 0.01 seconds ==========================='
nomatch: '*2 passed*'
and: u'============================= test session starts =============================='
and: u'platform linux2 -- Python 2.7.3 -- pytest-2.1.2'
and: u'collecting ... collected 0 items'
and: u''
and: u'=============================== in 0.17 seconds ==============================='
====================================================== 1 failed, 36 passed, 1 xfailed in 53.20 seconds ======================================================
Metadata
Metadata
Assignees
Labels
type: bugproblem that needs to be addressedproblem that needs to be addressed