Skip to content

Instantly share code, notes, and snippets.

@jaraco
Created October 21, 2016 15:17
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jaraco/6be7e8fb4d9f8e21b0883e6f56db2985 to your computer and use it in GitHub Desktop.
Save jaraco/6be7e8fb4d9f8e21b0883e6f56db2985 to your computer and use it in GitHub Desktop.
pytest test failures on macOS, Python 3.5
$ python -m tox -e py35 -- -rs
GLOB sdist-make: /Users/jaraco/Dropbox/code/public/pytest/setup.py
py35 recreate: /Users/jaraco/Dropbox/code/public/pytest/.tox/py35
py35 installdeps: hypothesis>=3.5.2, nose, mock, requests
py35 inst: /Users/jaraco/Dropbox/code/public/pytest/.tox/dist/pytest-3.0.4.dev0.zip
py35 installed: hypothesis==3.5.3,mock==2.0.0,nose==1.3.7,pbr==1.10.0,py==1.4.31,pytest==3.0.4.dev0,requests==2.11.1,six==1.10.0,spark-parser==1.4.0,uncompyle6==2.9.2,xdis==3.1.0
py35 runtests: PYTHONHASHSEED='2429941045'
py35 runtests: commands[0] | pytest --lsof -rfsxX -rs
=========================================== test session starts ===========================================
platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0
rootdir: /Users/jaraco/Dropbox/code/public/pytest, inifile: tox.ini
plugins: hypothesis-3.5.3
collected 1724 items
doc/en/example/assertion/test_failures.py .
doc/en/example/assertion/test_setup_flow_example.py ..
doc/en/example/assertion/global_testmodule_config/test_hello.py .
doc/en/example/costlysetup/sub1/test_quick.py .
doc/en/example/costlysetup/sub2/test_two.py ..
doc/en/example/py2py3/test_py3.py .
testing/acceptance_test.py ................F...............................x...........
testing/deprecated_test.py ......
testing/test_argcomplete.py ss
testing/test_assertion.py ..............................................................s.....
testing/test_assertrewrite.py ....................................ssss..........
testing/test_cache.py ..................
testing/test_capture.py ...........x......................F...........s...............s...........s....................
testing/test_collection.py ...........x....F......................
testing/test_config.py .........x.....s...................................................
testing/test_conftest.py ................................................
testing/test_doctest.py .......................................................................................
testing/test_entry_points.py ...
testing/test_helpconfig.py .......
testing/test_junitxml.py ........F..............................s.x..
testing/test_mark.py .....................................x.x.......x.........x.
testing/test_monkeypatch.py ................................
testing/test_nose.py ...................
testing/test_parseopt.py ...........................s
testing/test_pastebin.py ....
testing/test_pdb.py ....ssssssssssssss.s.
testing/test_pluginmanager.py ..........................
testing/test_pytester.py x......
testing/test_recwarn.py ......................
testing/test_resultlog.py ...........
testing/test_runner.py ...................sssssss...ssss......x.......................
testing/test_runner_xunit.py ...............
testing/test_session.py .................
testing/test_skipping.py ...s.................................................................
testing/test_terminal.py ..........s.........................s.............................................................
testing/test_tmpdir.py ...........s
testing/test_unittest.py ...................ssssssss................
testing/code/test_code.py .........s....
testing/code/test_excinfo.py ...............s.......s.............................................................
testing/code/test_source.py ..................................................................
testing/freeze/tests/test_doctest.txt .
testing/freeze/tests/test_trivial.py ..
testing/python/approx.py ........................
testing/python/collect.py ...................................................F.......................
testing/python/fixture.py ......F................................................................x.......................................................................................
testing/python/integration.py ..................
testing/python/metafunc.py ....................................................................F...........x..........
testing/python/raises.py ...........
testing/python/setup_only.py ........................
testing/python/setup_plan.py .
testing/python/show_fixtures_per_test.py .....
========================================= short test summary info =========================================
SKIP [1] testing/test_assertrewrite.py:592: condition: sys.version_info[0] >= 3
SKIP [1] testing/test_argcomplete.py:80: condition: sys.platform in ('win32', 'darwin')
SKIP [1] testing/test_assertrewrite.py:601: condition: sys.version_info[0] >= 3
SKIP [1] testing/test_skipping.py:41: condition: sys.version_info[0] >= 3
SKIP [1] /Users/jaraco/Dropbox/code/public/pytest/testing/test_unittest.py:340: could not import 'twisted.trial.unittest'
SKIP [1] /Users/jaraco/Dropbox/code/public/pytest/testing/code/test_excinfo.py:326: could not import 'jinja2'
SKIP [1] testing/code/test_code.py:78: python 2 only issue
SKIP [1] /Users/jaraco/Dropbox/code/public/pytest/testing/test_terminal.py:483: xdist plugin not installed
SKIP [1] /Users/jaraco/Dropbox/code/public/pytest/testing/test_junitxml.py:796: could not import 'xdist'
SKIP [1] testing/test_assertion.py:790: This bug does not exist on PY3
SKIP [1] /Users/jaraco/Dropbox/code/public/pytest/testing/test_unittest.py:353: could not import 'twisted.trial.unittest'
SKIP [4] /Users/jaraco/Dropbox/code/public/pytest/testing/test_unittest.py:367: could not import 'twisted.trial.unittest'
SKIP [1] testing/test_capture.py:677: python2 has no buffer
SKIP [16] /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/pytester.py:1002: could not import 'pexpect'
SKIP [1] testing/test_config.py:136: condition: sys.version_info[:2] not in [(2, 6), (2, 7)]
SKIP [1] testing/test_tmpdir.py:172: win only
SKIP [1] /Users/jaraco/Dropbox/code/public/pytest/testing/test_unittest.py:327: could not import 'twisted.trial.unittest'
SKIP [1] testing/test_assertrewrite.py:583: condition: sys.version_info[0] >= 3
SKIP [11] /Users/jaraco/Dropbox/code/public/pytest/testing/test_runner.py:335: could not import 'xdist.boxed'
SKIP [1] testing/test_argcomplete.py:72: condition: sys.platform in ('win32', 'darwin')
SKIP [1] testing/test_assertrewrite.py:574: condition: sys.version_info[0] >= 3
SKIP [1] /Users/jaraco/Dropbox/code/public/pytest/testing/test_parseopt.py:292: argcomplete not available
SKIP [1] /Users/jaraco/Dropbox/code/public/pytest/testing/test_unittest.py:314: could not import 'twisted.trial.unittest'
SKIP [2] testing/test_capture.py:879: text output different for bytes on python3
SKIP [1] /Users/jaraco/Dropbox/code/public/pytest/testing/code/test_excinfo.py:233: could not import 'decorator'
================================================ FAILURES =================================================
_______________________ TestGeneralUsage.test_issue109_sibling_conftests_not_loaded _______________________
self = <acceptance_test.TestGeneralUsage object at 0x104f27fd0>
testdir = <Testdir local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_issue109_sibling_conftests_not_loaded0')>
def test_issue109_sibling_conftests_not_loaded(self, testdir):
sub1 = testdir.tmpdir.mkdir("sub1")
sub2 = testdir.tmpdir.mkdir("sub2")
sub1.join("conftest.py").write("assert 0")
result = testdir.runpytest(sub2)
assert result.ret == EXIT_NOTESTSCOLLECTED
sub2.ensure("__init__.py")
p = sub2.ensure("test_hello.py")
result = testdir.runpytest(p)
> assert result.ret == EXIT_NOTESTSCOLLECTED
E assert 2 == 5
E + where 2 = <_pytest.pytester.RunResult object at 0x104ab13c8>.ret
/Users/jaraco/Dropbox/code/public/pytest/testing/acceptance_test.py:227: AssertionError
------------------------------------------ Captured stdout call -------------------------------------------
============================= test session starts ==============================
platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0
rootdir: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_issue109_sibling_conftests_not_loaded0, inifile:
plugins: hypothesis-3.5.3
collected 0 items
========================= no tests ran in 0.00 seconds =========================
============================= test session starts ==============================
platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0
rootdir: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_issue109_sibling_conftests_not_loaded0, inifile:
plugins: hypothesis-3.5.3
collected 0 items / 1 errors
==================================== ERRORS ====================================
_____________________ ERROR collecting sub2/test_hello.py ______________________
ImportError while importing test module '/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_issue109_sibling_conftests_not_loaded0/sub2/test_hello.py'.
Hint: make sure your test modules/packages have valid Python names.
Traceback:
ImportError: No module named 'sub2.test_hello'
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.18 seconds ============================
_______________________________ test_setup_failure_does_not_kill_capturing ________________________________
testdir = <Testdir local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_failure_does_not_kill_capturing0')>
def test_setup_failure_does_not_kill_capturing(testdir):
sub1 = testdir.mkpydir("sub1")
sub1.join("conftest.py").write(_pytest._code.Source("""
def pytest_runtest_setup(item):
raise ValueError(42)
"""))
sub1.join("test_mod.py").write("def test_func1(): pass")
result = testdir.runpytest(testdir.tmpdir, '--traceconfig')
result.stdout.fnmatch_lines([
"*ValueError(42)*",
> "*1 error*"
])
E Failed: nomatch: '*ValueError(42)*'
E and: 'PLUGIN registered: <_pytest.config.PytestPluginManager object at 0x1051f4550>'
E and: 'PLUGIN registered: <_pytest.config.Config object at 0x10590a2e8>'
E and: "PLUGIN registered: <module '_pytest.mark' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/mark.py'>"
E and: "PLUGIN registered: <module '_pytest.main' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py'>"
E and: "PLUGIN registered: <module '_pytest.terminal' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/terminal.py'>"
E and: "PLUGIN registered: <module '_pytest.runner' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/runner.py'>"
E and: "PLUGIN registered: <module '_pytest.python' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/python.py'>"
E and: "PLUGIN registered: <module '_pytest.fixtures' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/fixtures.py'>"
E and: "PLUGIN registered: <module '_pytest.debugging' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/debugging.py'>"
E and: "PLUGIN registered: <module '_pytest.unittest' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/unittest.py'>"
E and: "PLUGIN registered: <module '_pytest.capture' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/capture.py'>"
E and: "PLUGIN registered: <module '_pytest.skipping' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/skipping.py'>"
E and: "PLUGIN registered: <module '_pytest.tmpdir' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/tmpdir.py'>"
E and: "PLUGIN registered: <module '_pytest.monkeypatch' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/monkeypatch.py'>"
E and: "PLUGIN registered: <module '_pytest.recwarn' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/recwarn.py'>"
E and: "PLUGIN registered: <module '_pytest.pastebin' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/pastebin.py'>"
E and: "PLUGIN registered: <module '_pytest.helpconfig' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/helpconfig.py'>"
E and: "PLUGIN registered: <module '_pytest.nose' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/nose.py'>"
E and: "PLUGIN registered: <module '_pytest.assertion' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/assertion/__init__.py'>"
E and: "PLUGIN registered: <module '_pytest.junitxml' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/junitxml.py'>"
E and: "PLUGIN registered: <module '_pytest.resultlog' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/resultlog.py'>"
E and: "PLUGIN registered: <module '_pytest.doctest' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/doctest.py'>"
E and: "PLUGIN registered: <module '_pytest.cacheprovider' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/cacheprovider.py'>"
E and: "PLUGIN registered: <module '_pytest.freeze_support' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/freeze_support.py'>"
E and: "PLUGIN registered: <module '_pytest.setuponly' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/setuponly.py'>"
E and: "PLUGIN registered: <module '_pytest.setupplan' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/setupplan.py'>"
E and: 'PLUGIN registered: <_pytest.pytester.Testdir.inline_run.<locals>.Collect object at 0x1051d8a90>'
E and: "PLUGIN registered: <module 'hypothesis.extra.pytestplugin' (<_pytest.assertion.rewrite.AssertionRewritingHook object at 0x1026d47f0>)>"
E and: 'PLUGIN registered: <_pytest.capture.CaptureManager object at 0x104e87828>'
E and: "PLUGIN registered: <Session 'test_setup_failure_does_not_kill_capturing0'>"
E and: 'PLUGIN registered: <_pytest.cacheprovider.LFPlugin object at 0x104ad3be0>'
E and: 'PLUGIN registered: <_pytest.terminal.TerminalReporter object at 0x104ad3278>'
E and: 'PLUGIN registered: <_pytest.fixtures.FixtureManager object at 0x105647780>'
E and: '============================= test session starts =============================='
E and: 'platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0'
E and: 'using: pytest-3.0.4.dev pylib-1.4.31'
E and: 'setuptools registered plugins:'
E and: ' hypothesis-3.5.3 at /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/hypothesis/extra/pytestplugin.py'
E and: 'active plugins:'
E and: ' setuponly : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/setuponly.py'
E and: ' 4380789392 : <_pytest.pytester.Testdir.inline_run.<locals>.Collect object at 0x1051d8a90>'
E and: ' skipping : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/skipping.py'
E and: ' mark : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/mark.py'
E and: ' nose : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/nose.py'
E and: ' terminalreporter : <_pytest.terminal.TerminalReporter object at 0x104ad3278>'
E and: ' recwarn : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/recwarn.py'
E and: ' freeze_support : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/freeze_support.py'
E and: ' tmpdir : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/tmpdir.py'
E and: ' pytestconfig : <_pytest.config.Config object at 0x10590a2e8>'
E and: ' setupplan : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/setupplan.py'
E and: ' resultlog : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/resultlog.py'
E and: ' cacheprovider : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/cacheprovider.py'
E and: ' lfplugin : <_pytest.cacheprovider.LFPlugin object at 0x104ad3be0>'
E and: ' capture : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/capture.py'
E and: ' doctest : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/doctest.py'
E and: ' unittest : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/unittest.py'
E and: ' terminal : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/terminal.py'
E and: " session : <Session 'test_setup_failure_does_not_kill_capturing0'>"
E and: ' monkeypatch : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/monkeypatch.py'
E and: ' main : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py'
E and: ' python : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/python.py'
E and: ' pastebin : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/pastebin.py'
E and: ' hypothesispytest : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/hypothesis/extra/pytestplugin.py'
E and: ' 4380902736 : <_pytest.config.PytestPluginManager object at 0x1051f4550>'
E and: ' debugging : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/debugging.py'
E and: ' capturemanager : <_pytest.capture.CaptureManager object at 0x104e87828>'
E and: ' runner : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/runner.py'
E and: ' funcmanage : <_pytest.fixtures.FixtureManager object at 0x105647780>'
E and: ' junitxml : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/junitxml.py'
E and: ' assertion : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/assertion/__init__.py'
E and: ' helpconfig : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/helpconfig.py'
E and: ' fixtures : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/fixtures.py'
E and: 'rootdir: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_failure_does_not_kill_capturing0, inifile: '
E and: 'plugins: hypothesis-3.5.3'
E and: 'collected 0 items / 1 errors'
E and: ''
E and: '==================================== ERRORS ===================================='
E and: '______________________________ ERROR collecting _______________________________'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:570: in gethookproxy'
E and: ' return self._fs2hookproxy[fspath]'
E and: "E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_failure_does_not_kill_capturing0/sub1')"
E and: ''
E and: 'During handling of the above exception, another exception occurred:'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:301: in _getconftestmodules'
E and: ' return self._path2confmods[path]'
E and: "E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_failure_does_not_kill_capturing0/sub1')"
E and: ''
E and: 'During handling of the above exception, another exception occurred:'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:332: in _importconftest'
E and: ' return self._conftestpath2mod[conftestpath]'
E and: "E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_failure_does_not_kill_capturing0/sub1/conftest.py')"
E and: ''
E and: 'During handling of the above exception, another exception occurred:'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:338: in _importconftest'
E and: ' mod = conftestpath.pyimport()'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport'
E and: ' __import__(modname)'
E and: "E ImportError: No module named 'sub1.conftest'"
E and: ''
E and: 'During handling of the above exception, another exception occurred:'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:332: in visit'
E and: ' for x in Visitor(fil, rec, ignore, bf, sort).gen(self):'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:367: in gen'
E and: ' dirs = self.optsort([p for p in entries'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:368: in <listcomp>'
E and: ' if p.check(dir=1) and (rec is None or rec(p))])'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:672: in _recurse'
E and: ' ihook = self.gethookproxy(path)'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:575: in gethookproxy'
E and: ' my_conftestmodules = pm._getconftestmodules(fspath)'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:315: in _getconftestmodules'
E and: ' mod = self._importconftest(conftestpath)'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:340: in _importconftest'
E and: ' raise ConftestImportFailure(conftestpath, sys.exc_info())'
E and: 'E _pytest.config.ConftestImportFailure: ImportError("No module named \'sub1.conftest\'",)'
E and: '!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!'
E and: '=========================== 1 error in 0.42 seconds ============================'
E and: ''
E remains unmatched: '*ValueError(42)*'
/Users/jaraco/Dropbox/code/public/pytest/testing/test_capture.py:529: Failed
------------------------------------------ Captured stdout call -------------------------------------------
PLUGIN registered: <_pytest.config.PytestPluginManager object at 0x1051f4550>
PLUGIN registered: <_pytest.config.Config object at 0x10590a2e8>
PLUGIN registered: <module '_pytest.mark' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/mark.py'>
PLUGIN registered: <module '_pytest.main' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py'>
PLUGIN registered: <module '_pytest.terminal' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/terminal.py'>
PLUGIN registered: <module '_pytest.runner' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/runner.py'>
PLUGIN registered: <module '_pytest.python' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/python.py'>
PLUGIN registered: <module '_pytest.fixtures' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/fixtures.py'>
PLUGIN registered: <module '_pytest.debugging' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/debugging.py'>
PLUGIN registered: <module '_pytest.unittest' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/unittest.py'>
PLUGIN registered: <module '_pytest.capture' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/capture.py'>
PLUGIN registered: <module '_pytest.skipping' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/skipping.py'>
PLUGIN registered: <module '_pytest.tmpdir' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/tmpdir.py'>
PLUGIN registered: <module '_pytest.monkeypatch' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/monkeypatch.py'>
PLUGIN registered: <module '_pytest.recwarn' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/recwarn.py'>
PLUGIN registered: <module '_pytest.pastebin' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/pastebin.py'>
PLUGIN registered: <module '_pytest.helpconfig' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/helpconfig.py'>
PLUGIN registered: <module '_pytest.nose' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/nose.py'>
PLUGIN registered: <module '_pytest.assertion' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/assertion/__init__.py'>
PLUGIN registered: <module '_pytest.junitxml' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/junitxml.py'>
PLUGIN registered: <module '_pytest.resultlog' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/resultlog.py'>
PLUGIN registered: <module '_pytest.doctest' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/doctest.py'>
PLUGIN registered: <module '_pytest.cacheprovider' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/cacheprovider.py'>
PLUGIN registered: <module '_pytest.freeze_support' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/freeze_support.py'>
PLUGIN registered: <module '_pytest.setuponly' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/setuponly.py'>
PLUGIN registered: <module '_pytest.setupplan' from '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/setupplan.py'>
PLUGIN registered: <_pytest.pytester.Testdir.inline_run.<locals>.Collect object at 0x1051d8a90>
PLUGIN registered: <module 'hypothesis.extra.pytestplugin' (<_pytest.assertion.rewrite.AssertionRewritingHook object at 0x1026d47f0>)>
PLUGIN registered: <_pytest.capture.CaptureManager object at 0x104e87828>
PLUGIN registered: <Session 'test_setup_failure_does_not_kill_capturing0'>
PLUGIN registered: <_pytest.cacheprovider.LFPlugin object at 0x104ad3be0>
PLUGIN registered: <_pytest.terminal.TerminalReporter object at 0x104ad3278>
PLUGIN registered: <_pytest.fixtures.FixtureManager object at 0x105647780>
============================= test session starts ==============================
platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0
using: pytest-3.0.4.dev pylib-1.4.31
setuptools registered plugins:
hypothesis-3.5.3 at /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/hypothesis/extra/pytestplugin.py
active plugins:
setuponly : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/setuponly.py
4380789392 : <_pytest.pytester.Testdir.inline_run.<locals>.Collect object at 0x1051d8a90>
skipping : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/skipping.py
mark : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/mark.py
nose : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/nose.py
terminalreporter : <_pytest.terminal.TerminalReporter object at 0x104ad3278>
recwarn : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/recwarn.py
freeze_support : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/freeze_support.py
tmpdir : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/tmpdir.py
pytestconfig : <_pytest.config.Config object at 0x10590a2e8>
setupplan : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/setupplan.py
resultlog : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/resultlog.py
cacheprovider : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/cacheprovider.py
lfplugin : <_pytest.cacheprovider.LFPlugin object at 0x104ad3be0>
capture : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/capture.py
doctest : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/doctest.py
unittest : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/unittest.py
terminal : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/terminal.py
session : <Session 'test_setup_failure_does_not_kill_capturing0'>
monkeypatch : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/monkeypatch.py
main : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py
python : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/python.py
pastebin : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/pastebin.py
hypothesispytest : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/hypothesis/extra/pytestplugin.py
4380902736 : <_pytest.config.PytestPluginManager object at 0x1051f4550>
debugging : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/debugging.py
capturemanager : <_pytest.capture.CaptureManager object at 0x104e87828>
runner : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/runner.py
funcmanage : <_pytest.fixtures.FixtureManager object at 0x105647780>
junitxml : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/junitxml.py
assertion : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/assertion/__init__.py
helpconfig : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/helpconfig.py
fixtures : /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/fixtures.py
rootdir: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_failure_does_not_kill_capturing0, inifile:
plugins: hypothesis-3.5.3
collected 0 items / 1 errors
==================================== ERRORS ====================================
______________________________ ERROR collecting _______________________________
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:570: in gethookproxy
return self._fs2hookproxy[fspath]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_failure_does_not_kill_capturing0/sub1')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:301: in _getconftestmodules
return self._path2confmods[path]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_failure_does_not_kill_capturing0/sub1')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:332: in _importconftest
return self._conftestpath2mod[conftestpath]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_failure_does_not_kill_capturing0/sub1/conftest.py')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:338: in _importconftest
mod = conftestpath.pyimport()
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
E ImportError: No module named 'sub1.conftest'
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:332: in visit
for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:367: in gen
dirs = self.optsort([p for p in entries
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:368: in <listcomp>
if p.check(dir=1) and (rec is None or rec(p))])
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:672: in _recurse
ihook = self.gethookproxy(path)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:575: in gethookproxy
my_conftestmodules = pm._getconftestmodules(fspath)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:315: in _getconftestmodules
mod = self._importconftest(conftestpath)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:340: in _importconftest
raise ConftestImportFailure(conftestpath, sys.exc_info())
E _pytest.config.ConftestImportFailure: ImportError("No module named 'sub1.conftest'",)
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.42 seconds ============================
______________________ TestCustomConftests.test_pytest_collect_file_from_sister_dir _______________________
self = <test_collection.TestCustomConftests object at 0x1049ef320>
testdir = <Testdir local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_pytest_collect_file_from_sister_dir0')>
def test_pytest_collect_file_from_sister_dir(self, testdir):
sub1 = testdir.mkpydir("sub1")
sub2 = testdir.mkpydir("sub2")
conf1 = testdir.makeconftest("""
import pytest
class MyModule1(pytest.Module):
pass
def pytest_collect_file(path, parent):
if path.ext == ".py":
return MyModule1(path, parent)
""")
conf1.move(sub1.join(conf1.basename))
conf2 = testdir.makeconftest("""
import pytest
class MyModule2(pytest.Module):
pass
def pytest_collect_file(path, parent):
if path.ext == ".py":
return MyModule2(path, parent)
""")
conf2.move(sub2.join(conf2.basename))
p = testdir.makepyfile("def test_x(): pass")
p.copy(sub1.join(p.basename))
p.copy(sub2.join(p.basename))
result = testdir.runpytest("--collect-only")
result.stdout.fnmatch_lines([
"*MyModule1*",
"*MyModule2*",
> "*test_x*"
])
E Failed: nomatch: '*MyModule1*'
E and: '============================= test session starts =============================='
E and: 'platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0'
E and: 'rootdir: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_pytest_collect_file_from_sister_dir0, inifile: '
E and: 'plugins: hypothesis-3.5.3'
E and: 'collected 0 items / 1 errors'
E and: ''
E and: '==================================== ERRORS ===================================='
E and: '______________________________ ERROR collecting _______________________________'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:570: in gethookproxy'
E and: ' return self._fs2hookproxy[fspath]'
E and: "E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_pytest_collect_file_from_sister_dir0/sub1')"
E and: ''
E and: 'During handling of the above exception, another exception occurred:'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:301: in _getconftestmodules'
E and: ' return self._path2confmods[path]'
E and: "E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_pytest_collect_file_from_sister_dir0/sub1')"
E and: ''
E and: 'During handling of the above exception, another exception occurred:'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:332: in _importconftest'
E and: ' return self._conftestpath2mod[conftestpath]'
E and: "E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_pytest_collect_file_from_sister_dir0/sub1/conftest.py')"
E and: ''
E and: 'During handling of the above exception, another exception occurred:'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:338: in _importconftest'
E and: ' mod = conftestpath.pyimport()'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport'
E and: ' __import__(modname)'
E and: "E ImportError: No module named 'sub1.conftest'"
E and: ''
E and: 'During handling of the above exception, another exception occurred:'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:332: in visit'
E and: ' for x in Visitor(fil, rec, ignore, bf, sort).gen(self):'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:367: in gen'
E and: ' dirs = self.optsort([p for p in entries'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:368: in <listcomp>'
E and: ' if p.check(dir=1) and (rec is None or rec(p))])'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:672: in _recurse'
E and: ' ihook = self.gethookproxy(path)'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:575: in gethookproxy'
E and: ' my_conftestmodules = pm._getconftestmodules(fspath)'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:315: in _getconftestmodules'
E and: ' mod = self._importconftest(conftestpath)'
E and: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:340: in _importconftest'
E and: ' raise ConftestImportFailure(conftestpath, sys.exc_info())'
E and: 'E _pytest.config.ConftestImportFailure: ImportError("No module named \'sub1.conftest\'",)'
E and: '!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!'
E and: '=========================== 1 error in 0.52 seconds ============================'
E and: ''
E remains unmatched: '*MyModule1*'
/Users/jaraco/Dropbox/code/public/pytest/testing/test_collection.py:312: Failed
------------------------------------------ Captured stdout call -------------------------------------------
============================= test session starts ==============================
platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0
rootdir: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_pytest_collect_file_from_sister_dir0, inifile:
plugins: hypothesis-3.5.3
collected 0 items / 1 errors
==================================== ERRORS ====================================
______________________________ ERROR collecting _______________________________
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:570: in gethookproxy
return self._fs2hookproxy[fspath]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_pytest_collect_file_from_sister_dir0/sub1')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:301: in _getconftestmodules
return self._path2confmods[path]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_pytest_collect_file_from_sister_dir0/sub1')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:332: in _importconftest
return self._conftestpath2mod[conftestpath]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_pytest_collect_file_from_sister_dir0/sub1/conftest.py')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:338: in _importconftest
mod = conftestpath.pyimport()
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
E ImportError: No module named 'sub1.conftest'
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:332: in visit
for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:367: in gen
dirs = self.optsort([p for p in entries
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:368: in <listcomp>
if p.check(dir=1) and (rec is None or rec(p))])
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:672: in _recurse
ihook = self.gethookproxy(path)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:575: in gethookproxy
my_conftestmodules = pm._getconftestmodules(fspath)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:315: in _getconftestmodules
mod = self._importconftest(conftestpath)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:340: in _importconftest
raise ConftestImportFailure(conftestpath, sys.exc_info())
E _pytest.config.ConftestImportFailure: ImportError("No module named 'sub1.conftest'",)
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.52 seconds ============================
__________________________________ TestPython.test_classname_nested_dir ___________________________________
self = <test_junitxml.TestPython object at 0x104f5a9e8>
testdir = <Testdir local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_classname_nested_dir0')>
def test_classname_nested_dir(self, testdir):
p = testdir.tmpdir.ensure("sub", "test_hello.py")
p.write("def test_func(): 0/0")
result, dom = runandparse(testdir)
assert result.ret
node = dom.find_first_by_tag("testsuite")
> node.assert_attr(failures=1)
E assert {'failures': '0'} == {'failures': '1'}
E Differing items:
E {'failures': '0'} != {'failures': '1'}
E Use -v to get the full diff
/Users/jaraco/Dropbox/code/public/pytest/testing/test_junitxml.py:251: AssertionError
------------------------------------------ Captured stdout call -------------------------------------------
============================= test session starts ==============================
platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0
rootdir: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_classname_nested_dir0, inifile:
plugins: hypothesis-3.5.3
collected 0 items / 1 errors
generated xml file: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_classname_nested_dir0/junit.xml
==================================== ERRORS ====================================
______________________ ERROR collecting sub/test_hello.py ______________________
import file mismatch:
imported module 'test_hello' has this __file__ attribute:
/Users/jaraco/Dropbox/code/public/pytest/doc/en/example/assertion/global_testmodule_config/test_hello.py
which is not the same as the test file we want to collect:
/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_classname_nested_dir0/sub/test_hello.py
HINT: remove __pycache__ / .pyc files and/or use a unique basename for your test file modules
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.19 seconds ============================
___________________________________ test_setup_only_available_in_subdir ___________________________________
testdir = <Testdir local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_only_available_in_subdir0')>
def test_setup_only_available_in_subdir(testdir):
sub1 = testdir.mkpydir("sub1")
sub2 = testdir.mkpydir("sub2")
sub1.join("conftest.py").write(_pytest._code.Source("""
import pytest
def pytest_runtest_setup(item):
assert item.fspath.purebasename == "test_in_sub1"
def pytest_runtest_call(item):
assert item.fspath.purebasename == "test_in_sub1"
def pytest_runtest_teardown(item):
assert item.fspath.purebasename == "test_in_sub1"
"""))
sub2.join("conftest.py").write(_pytest._code.Source("""
import pytest
def pytest_runtest_setup(item):
assert item.fspath.purebasename == "test_in_sub2"
def pytest_runtest_call(item):
assert item.fspath.purebasename == "test_in_sub2"
def pytest_runtest_teardown(item):
assert item.fspath.purebasename == "test_in_sub2"
"""))
sub1.join("test_in_sub1.py").write("def test_1(): pass")
sub2.join("test_in_sub2.py").write("def test_2(): pass")
result = testdir.runpytest("-v", "-s")
> result.assert_outcomes(passed=2)
/Users/jaraco/Dropbox/code/public/pytest/testing/python/collect.py:835:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.pytester.RunResult object at 0x10416bba8>, passed = 2, skipped = 0, failed = 0
def assert_outcomes(self, passed=0, skipped=0, failed=0):
""" assert that the specified outcomes appear with the respective
numbers (0 means it didn't occur) in the text output from a test run."""
d = self.parseoutcomes()
> assert passed == d.get("passed", 0)
E AssertionError
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/pytester.py:375: AssertionError
------------------------------------------ Captured stdout call -------------------------------------------
============================= test session starts ==============================
platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0 -- /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/bin/python3.5
cachedir: .cache
rootdir: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_only_available_in_subdir0, inifile:
plugins: hypothesis-3.5.3
collecting ... collected 0 items / 1 errors
==================================== ERRORS ====================================
______________________________ ERROR collecting _______________________________
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:570: in gethookproxy
return self._fs2hookproxy[fspath]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_only_available_in_subdir0/sub1')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:301: in _getconftestmodules
return self._path2confmods[path]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_only_available_in_subdir0/sub1')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:332: in _importconftest
return self._conftestpath2mod[conftestpath]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_setup_only_available_in_subdir0/sub1/conftest.py')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:338: in _importconftest
mod = conftestpath.pyimport()
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
E ImportError: No module named 'sub1.conftest'
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:332: in visit
for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:367: in gen
dirs = self.optsort([p for p in entries
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:368: in <listcomp>
if p.check(dir=1) and (rec is None or rec(p))])
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:672: in _recurse
ihook = self.gethookproxy(path)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:575: in gethookproxy
my_conftestmodules = pm._getconftestmodules(fspath)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:315: in _getconftestmodules
mod = self._importconftest(conftestpath)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:340: in _importconftest
raise ConftestImportFailure(conftestpath, sys.exc_info())
E _pytest.config.ConftestImportFailure: ImportError("No module named 'sub1.conftest'",)
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.56 seconds ============================
____________________ TestFillFixtures.test_conftest_funcargs_only_available_in_subdir _____________________
self = <fixture.TestFillFixtures object at 0x10566a8d0>
testdir = <Testdir local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_conftest_funcargs_only_available_in_subdir0')>
def test_conftest_funcargs_only_available_in_subdir(self, testdir):
sub1 = testdir.mkpydir("sub1")
sub2 = testdir.mkpydir("sub2")
sub1.join("conftest.py").write(_pytest._code.Source("""
import pytest
@pytest.fixture
def arg1(request):
pytest.raises(Exception, "request.getfixturevalue('arg2')")
"""))
sub2.join("conftest.py").write(_pytest._code.Source("""
import pytest
@pytest.fixture
def arg2(request):
pytest.raises(Exception, "request.getfixturevalue('arg1')")
"""))
sub1.join("test_in_sub1.py").write("def test_1(arg1): pass")
sub2.join("test_in_sub2.py").write("def test_2(arg2): pass")
result = testdir.runpytest("-v")
> result.assert_outcomes(passed=2)
/Users/jaraco/Dropbox/code/public/pytest/testing/python/fixture.py:122:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.pytester.RunResult object at 0x1049f26d8>, passed = 2, skipped = 0, failed = 0
def assert_outcomes(self, passed=0, skipped=0, failed=0):
""" assert that the specified outcomes appear with the respective
numbers (0 means it didn't occur) in the text output from a test run."""
d = self.parseoutcomes()
> assert passed == d.get("passed", 0)
E AssertionError
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/pytester.py:375: AssertionError
------------------------------------------ Captured stdout call -------------------------------------------
============================= test session starts ==============================
platform darwin -- Python 3.5.2, pytest-3.0.4.dev, py-1.4.31, pluggy-0.4.0 -- /Users/jaraco/Dropbox/code/public/pytest/.tox/py35/bin/python3.5
cachedir: .cache
rootdir: /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_conftest_funcargs_only_available_in_subdir0, inifile:
plugins: hypothesis-3.5.3
collecting ... collected 0 items / 1 errors
==================================== ERRORS ====================================
______________________________ ERROR collecting _______________________________
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:570: in gethookproxy
return self._fs2hookproxy[fspath]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_conftest_funcargs_only_available_in_subdir0/sub1')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:301: in _getconftestmodules
return self._path2confmods[path]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_conftest_funcargs_only_available_in_subdir0/sub1')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:332: in _importconftest
return self._conftestpath2mod[conftestpath]
E KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_conftest_funcargs_only_available_in_subdir0/sub1/conftest.py')
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:338: in _importconftest
mod = conftestpath.pyimport()
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/local.py:650: in pyimport
__import__(modname)
E ImportError: No module named 'sub1.conftest'
During handling of the above exception, another exception occurred:
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:332: in visit
for x in Visitor(fil, rec, ignore, bf, sort).gen(self):
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:367: in gen
dirs = self.optsort([p for p in entries
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/common.py:368: in <listcomp>
if p.check(dir=1) and (rec is None or rec(p))])
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:672: in _recurse
ihook = self.gethookproxy(path)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/main.py:575: in gethookproxy
my_conftestmodules = pm._getconftestmodules(fspath)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:315: in _getconftestmodules
mod = self._importconftest(conftestpath)
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py:340: in _importconftest
raise ConftestImportFailure(conftestpath, sys.exc_info())
E _pytest.config.ConftestImportFailure: ImportError("No module named 'sub1.conftest'",)
!!!!!!!!!!!!!!!!!!! Interrupted: 1 errors during collection !!!!!!!!!!!!!!!!!!!!
=========================== 1 error in 0.49 seconds ============================
_____________________ TestMetafuncFunctional.test_generate_tests_only_done_in_subdir ______________________
self = <metafunc.TestMetafuncFunctional object at 0x108780c88>
testdir = <Testdir local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_generate_tests_only_done_in_subdir0')>
def test_generate_tests_only_done_in_subdir(self, testdir):
sub1 = testdir.mkpydir("sub1")
sub2 = testdir.mkpydir("sub2")
sub1.join("conftest.py").write(_pytest._code.Source("""
def pytest_generate_tests(metafunc):
assert metafunc.function.__name__ == "test_1"
"""))
sub2.join("conftest.py").write(_pytest._code.Source("""
def pytest_generate_tests(metafunc):
assert metafunc.function.__name__ == "test_2"
"""))
sub1.join("test_in_sub1.py").write("def test_1(): pass")
sub2.join("test_in_sub2.py").write("def test_2(): pass")
result = testdir.runpytest("--keep-duplicates", "-v", "-s", sub1, sub2, sub1)
> result.assert_outcomes(passed=3)
/Users/jaraco/Dropbox/code/public/pytest/testing/python/metafunc.py:1032:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = <_pytest.pytester.RunResult object at 0x108194160>, passed = 3, skipped = 0, failed = 0
def assert_outcomes(self, passed=0, skipped=0, failed=0):
""" assert that the specified outcomes appear with the respective
numbers (0 means it didn't occur) in the text output from a test run."""
d = self.parseoutcomes()
> assert passed == d.get("passed", 0)
E AttributeError: 'NoneType' object has no attribute 'get'
/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/pytester.py:375: AttributeError
------------------------------------------ Captured stderr call -------------------------------------------
Traceback (most recent call last):
File "/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py", line 301, in _getconftestmodules
return self._path2confmods[path]
KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_generate_tests_only_done_in_subdir0/sub1')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py", line 332, in _importconftest
return self._conftestpath2mod[conftestpath]
KeyError: local('/private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_generate_tests_only_done_in_subdir0/sub1/conftest.py')
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/_pytest/config.py", line 338, in _importconftest
mod = conftestpath.pyimport()
File "/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/lib/python3.5/site-packages/py/_path/local.py", line 650, in pyimport
__import__(modname)
ImportError: No module named 'sub1.conftest'
ERROR: could not load /private/var/folders/c6/v7hnmq453xb6p2dbz1gqc6rr0000gn/T/pytest-of-jaraco/pytest-17/testdir/test_generate_tests_only_done_in_subdir0/sub1/conftest.py
===================== 7 failed, 1650 passed, 54 skipped, 13 xfailed in 154.36 seconds =====================
ERROR: InvocationError: '/Users/jaraco/Dropbox/code/public/pytest/.tox/py35/bin/pytest --lsof -rfsxX -rs'
_________________________________________________ summary _________________________________________________
ERROR: py35: commands failed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment