Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Regression with hypothesis 3.5.1 in pytest's test suite #368

Closed
nicoddemus opened this issue Sep 25, 2016 · 4 comments
Closed

Regression with hypothesis 3.5.1 in pytest's test suite #368

nicoddemus opened this issue Sep 25, 2016 · 4 comments

Comments

@nicoddemus
Copy link

Hi!

Version 3.5.1 breaks pytest's test suite. Here's a sample of an error:

============================= test session starts =============================
platform win32 -- Python 3.5.0, pytest-3.0.3.dev0, py-1.4.31, pluggy-0.3.1
rootdir: C:\pytest, inifile: tox.ini
plugins: hypothesis-3.5.1
collected 87 items

testing\test_doctest.py .......F

================================== FAILURES ===================================
_____________________ TestDoctests.test_multiple_patterns _____________________

self = <test_doctest.TestDoctests object at 0x04CD1FF0>
testdir = <Testdir local('C:\\Users\\Bruno\\AppData\\Local\\Temp\\pytest-of-Bruno\\pytest-4992\\testdir\\test_multiple_patterns0')>

    def test_multiple_patterns(self, testdir):
        """Test support for multiple --doctest-glob arguments (#1255).
            """
        testdir.maketxtfile(xdoc="""
                >>> 1
                1
            """)
        testdir.makefile('.foo', test="""
                >>> 1
                1
            """)
        testdir.maketxtfile(test_normal="""
                >>> 1
                1
            """)
        expected = set(['xdoc.txt', 'test.foo', 'test_normal.txt'])
        assert set(x.basename for x in testdir.tmpdir.listdir()) == expected
        args = ["--doctest-glob=xdoc*.txt", "--doctest-glob=*.foo"]
        result = testdir.runpytest(*args)
        result.stdout.fnmatch_lines([
            '*test.foo *',
            '*xdoc.txt *',
>           '*2 passed*',
        ])
E       Failed: nomatch: '*test.foo *'
E           and: '============================= test session starts ============================='
E           and: 'platform win32 -- Python 3.5.0, pytest-3.0.3.dev0, py-1.4.31, pluggy-0.3.1'
E           and: 'rootdir: C:\\Users\\Bruno\\AppData\\Local\\Temp\\pytest-of-Bruno\\pytest-4992\\testdir\\test_multiple_patterns0, inifile: '
E           and: 'plugins: hypothesis-3.5.1'
E           and: 'collected 2 items'
E           and: ''
E       fnmatch: '*test.foo *'
E          with: 'test.foo F'
E       fnmatch: '*xdoc.txt *'
E          with: 'xdoc.txt F'
E       nomatch: '*2 passed*'
E           and: ''
E           and: '================================== FAILURES ==================================='
E           and: '_____________________________ [doctest] test.foo ______________________________'
E           and: ''
E           and: "self = <CallInfo when='call' exception: 'DoctestItem' object has no attribute 'function'>"
E           and: 'func = <function call_runtest_hook.<locals>.<lambda> at 0x04BDE468>'
E           and: "when = 'call'"
E           and: ''
E           and: '    def __init__(self, func, when):'
E           and: '        #: context of invocation: one of "setup", "call",'
E           and: '        #: "teardown", "memocollect"'
E           and: '        self.when = when'
E           and: '        self.start = time()'
E           and: '        try:'
E           and: '>           self.result = func()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\runner.py:163: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: '>   return CallInfo(lambda: ihook(item=item, **kwds), when=when)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\runner.py:151: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "self = <_HookCaller 'pytest_runtest_call'>"
E           and: "kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'test.foo'>}"
E           and: ''
E           and: '    def __call__(self, **kwargs):'
E           and: '        assert not self.is_historic()'
E           and: '>       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:724: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.config.PytestPluginManager object at 0x04CD1050>'
E           and: "hook = <_HookCaller 'pytest_runtest_call'>"
E           and: 'methods = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]'
E           and: "kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'test.foo'>}"
E           and: ''
E           and: '    def _hookexec(self, hook, methods, kwargs):'
E           and: '        # called from all hookcaller instances.'
E           and: '        # enable_tracing will set its own wrapping function at self._inner_hookexec'
E           and: '>       return self._inner_hookexec(hook, methods, kwargs)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:338: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._TracedHookExecution object at 0x04BE4170>'
E           and: "hook = <_HookCaller 'pytest_runtest_call'>"
E           and: 'hook_impls = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]'
E           and: "kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'test.foo'>}"
E           and: ''
E           and: '    def __call__(self, hook, hook_impls, kwargs):'
E           and: '        self.before(hook.name, hook_impls, kwargs)'
E           and: '        outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))'
E           and: '        self.after(outcome, hook.name, hook_impls, kwargs)'
E           and: '>       return outcome.get_result()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:301: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x04C34DD0>'
E           and: ''
E           and: '    def get_result(self):'
E           and: '        if self.excinfo is None:'
E           and: '            return self.result'
E           and: '        else:'
E           and: '            ex = self.excinfo'
E           and: '            if _py3:'
E           and: '>               raise ex[1].with_traceback(ex[2])'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:278: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x04C34DD0>'
E           and: 'func = <function _TracedHookExecution.__call__.<locals>.<lambda> at 0x04BDE858>'
E           and: ''
E           and: '    def __init__(self, func):'
E           and: '        try:'
E           and: '>           self.result = func()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:264: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: '>   outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:299: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "hook = <_HookCaller 'pytest_runtest_call'>"
E           and: 'methods = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]'
E           and: "kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'test.foo'>}"
E           and: ''
E           and: '    self._inner_hookexec = lambda hook, methods, kwargs: \\'
E           and: '>       _MultiCall(methods, kwargs, hook.spec_opts).execute()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:333: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "self = <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>"
E           and: ''
E           and: '    def execute(self):'
E           and: '        all_kwargs = self.kwargs'
E           and: '        self.results = results = []'
E           and: '        firstresult = self.specopts.get("firstresult")'
E           and: '    '
E           and: '        while self.hook_impls:'
E           and: '            hook_impl = self.hook_impls.pop()'
E           and: '            args = [all_kwargs[argname] for argname in hook_impl.argnames]'
E           and: '            if hook_impl.hookwrapper:'
E           and: '>               return _wrapped_call(hook_impl.function(*args), self.execute)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:595: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'wrap_controller = <generator object pytest_runtest_call at 0x04C31F60>'
E           and: "func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>"
E           and: ''
E           and: '    def _wrapped_call(wrap_controller, func):'
E           and: '        """ Wrap calling to a function with a generator which needs to yield'
E           and: '        exactly once.  The yield point will trigger calling the wrapped function'
E           and: '        and return its _CallOutcome to the yield point.  The generator then needs'
E           and: '        to finish (raise StopIteration) in order for the wrapped call to complete.'
E           and: '        """'
E           and: '        try:'
E           and: '            next(wrap_controller)   # first yield'
E           and: '        except StopIteration:'
E           and: '            _raise_wrapfail(wrap_controller, "did not yield")'
E           and: '        call_outcome = _CallOutcome(func)'
E           and: '        try:'
E           and: '            wrap_controller.send(call_outcome)'
E           and: '            _raise_wrapfail(wrap_controller, "has second yield")'
E           and: '        except StopIteration:'
E           and: '            pass'
E           and: '>       return call_outcome.get_result()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:253: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x04C34F30>'
E           and: ''
E           and: '    def get_result(self):'
E           and: '        if self.excinfo is None:'
E           and: '            return self.result'
E           and: '        else:'
E           and: '            ex = self.excinfo'
E           and: '            if _py3:'
E           and: '>               raise ex[1].with_traceback(ex[2])'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:278: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x04C34F30>'
E           and: "func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>"
E           and: ''
E           and: '    def __init__(self, func):'
E           and: '        try:'
E           and: '>           self.result = func()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:264: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "self = <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>"
E           and: ''
E           and: '    def execute(self):'
E           and: '        all_kwargs = self.kwargs'
E           and: '        self.results = results = []'
E           and: '        firstresult = self.specopts.get("firstresult")'
E           and: '    '
E           and: '        while self.hook_impls:'
E           and: '            hook_impl = self.hook_impls.pop()'
E           and: '            args = [all_kwargs[argname] for argname in hook_impl.argnames]'
E           and: '            if hook_impl.hookwrapper:'
E           and: '>               return _wrapped_call(hook_impl.function(*args), self.execute)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:595: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'wrap_controller = <generator object pytest_runtest_call at 0x04C31FC0>'
E           and: "func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>"
E           and: ''
E           and: '    def _wrapped_call(wrap_controller, func):'
E           and: '        """ Wrap calling to a function with a generator which needs to yield'
E           and: '        exactly once.  The yield point will trigger calling the wrapped function'
E           and: '        and return its _CallOutcome to the yield point.  The generator then needs'
E           and: '        to finish (raise StopIteration) in order for the wrapped call to complete.'
E           and: '        """'
E           and: '        try:'
E           and: '>           next(wrap_controller)   # first yield'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:244: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "item = <DoctestItem 'test.foo'>"
E           and: ''
E           and: '    @pytest.mark.hookwrapper'
E           and: '    def pytest_runtest_call(item):'
E           and: '>       if not is_hypothesis_test(item.function):'
E           and: "E       AttributeError: 'DoctestItem' object has no attribute 'function'"
E           and: ''
E           and: 'c:\\pytest\\.env35\\lib\\site-packages\\hypothesis\\extra\\pytestplugin.py:76: AttributeError'
E           and: '_____________________________ [doctest] xdoc.txt ______________________________'
E           and: ''
E           and: "self = <CallInfo when='call' exception: 'DoctestItem' object has no attribute 'function'>"
E           and: 'func = <function call_runtest_hook.<locals>.<lambda> at 0x04BDEAE0>'
E           and: "when = 'call'"
E           and: ''
E           and: '    def __init__(self, func, when):'
E           and: '        #: context of invocation: one of "setup", "call",'
E           and: '        #: "teardown", "memocollect"'
E           and: '        self.when = when'
E           and: '        self.start = time()'
E           and: '        try:'
E           and: '>           self.result = func()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\runner.py:163: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: '>   return CallInfo(lambda: ihook(item=item, **kwds), when=when)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\runner.py:151: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "self = <_HookCaller 'pytest_runtest_call'>"
E           and: "kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'xdoc.txt'>}"
E           and: ''
E           and: '    def __call__(self, **kwargs):'
E           and: '        assert not self.is_historic()'
E           and: '>       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:724: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.config.PytestPluginManager object at 0x04CD1050>'
E           and: "hook = <_HookCaller 'pytest_runtest_call'>"
E           and: 'methods = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]'
E           and: "kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'xdoc.txt'>}"
E           and: ''
E           and: '    def _hookexec(self, hook, methods, kwargs):'
E           and: '        # called from all hookcaller instances.'
E           and: '        # enable_tracing will set its own wrapping function at self._inner_hookexec'
E           and: '>       return self._inner_hookexec(hook, methods, kwargs)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:338: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._TracedHookExecution object at 0x04BE4170>'
E           and: "hook = <_HookCaller 'pytest_runtest_call'>"
E           and: 'hook_impls = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]'
E           and: "kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'xdoc.txt'>}"
E           and: ''
E           and: '    def __call__(self, hook, hook_impls, kwargs):'
E           and: '        self.before(hook.name, hook_impls, kwargs)'
E           and: '        outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))'
E           and: '        self.after(outcome, hook.name, hook_impls, kwargs)'
E           and: '>       return outcome.get_result()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:301: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x0555B3D0>'
E           and: ''
E           and: '    def get_result(self):'
E           and: '        if self.excinfo is None:'
E           and: '            return self.result'
E           and: '        else:'
E           and: '            ex = self.excinfo'
E           and: '            if _py3:'
E           and: '>               raise ex[1].with_traceback(ex[2])'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:278: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x0555B3D0>'
E           and: 'func = <function _TracedHookExecution.__call__.<locals>.<lambda> at 0x04BDED20>'
E           and: ''
E           and: '    def __init__(self, func):'
E           and: '        try:'
E           and: '>           self.result = func()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:264: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: '>   outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:299: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "hook = <_HookCaller 'pytest_runtest_call'>"
E           and: 'methods = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]'
E           and: "kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'xdoc.txt'>}"
E           and: ''
E           and: '    self._inner_hookexec = lambda hook, methods, kwargs: \\'
E           and: '>       _MultiCall(methods, kwargs, hook.spec_opts).execute()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:333: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "self = <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>"
E           and: ''
E           and: '    def execute(self):'
E           and: '        all_kwargs = self.kwargs'
E           and: '        self.results = results = []'
E           and: '        firstresult = self.specopts.get("firstresult")'
E           and: '    '
E           and: '        while self.hook_impls:'
E           and: '            hook_impl = self.hook_impls.pop()'
E           and: '            args = [all_kwargs[argname] for argname in hook_impl.argnames]'
E           and: '            if hook_impl.hookwrapper:'
E           and: '>               return _wrapped_call(hook_impl.function(*args), self.execute)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:595: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'wrap_controller = <generator object pytest_runtest_call at 0x04C41A80>'
E           and: "func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>"
E           and: ''
E           and: '    def _wrapped_call(wrap_controller, func):'
E           and: '        """ Wrap calling to a function with a generator which needs to yield'
E           and: '        exactly once.  The yield point will trigger calling the wrapped function'
E           and: '        and return its _CallOutcome to the yield point.  The generator then needs'
E           and: '        to finish (raise StopIteration) in order for the wrapped call to complete.'
E           and: '        """'
E           and: '        try:'
E           and: '            next(wrap_controller)   # first yield'
E           and: '        except StopIteration:'
E           and: '            _raise_wrapfail(wrap_controller, "did not yield")'
E           and: '        call_outcome = _CallOutcome(func)'
E           and: '        try:'
E           and: '            wrap_controller.send(call_outcome)'
E           and: '            _raise_wrapfail(wrap_controller, "has second yield")'
E           and: '        except StopIteration:'
E           and: '            pass'
E           and: '>       return call_outcome.get_result()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:253: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x0555B290>'
E           and: ''
E           and: '    def get_result(self):'
E           and: '        if self.excinfo is None:'
E           and: '            return self.result'
E           and: '        else:'
E           and: '            ex = self.excinfo'
E           and: '            if _py3:'
E           and: '>               raise ex[1].with_traceback(ex[2])'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:278: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x0555B290>'
E           and: "func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>"
E           and: ''
E           and: '    def __init__(self, func):'
E           and: '        try:'
E           and: '>           self.result = func()'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:264: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "self = <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>"
E           and: ''
E           and: '    def execute(self):'
E           and: '        all_kwargs = self.kwargs'
E           and: '        self.results = results = []'
E           and: '        firstresult = self.specopts.get("firstresult")'
E           and: '    '
E           and: '        while self.hook_impls:'
E           and: '            hook_impl = self.hook_impls.pop()'
E           and: '            args = [all_kwargs[argname] for argname in hook_impl.argnames]'
E           and: '            if hook_impl.hookwrapper:'
E           and: '>               return _wrapped_call(hook_impl.function(*args), self.execute)'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:595: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: 'wrap_controller = <generator object pytest_runtest_call at 0x04C412D0>'
E           and: "func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>"
E           and: ''
E           and: '    def _wrapped_call(wrap_controller, func):'
E           and: '        """ Wrap calling to a function with a generator which needs to yield'
E           and: '        exactly once.  The yield point will trigger calling the wrapped function'
E           and: '        and return its _CallOutcome to the yield point.  The generator then needs'
E           and: '        to finish (raise StopIteration) in order for the wrapped call to complete.'
E           and: '        """'
E           and: '        try:'
E           and: '>           next(wrap_controller)   # first yield'
E           and: ''
E           and: 'c:\\pytest\\_pytest\\vendored_packages\\pluggy.py:244: '
E           and: '_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _'
E           and: ''
E           and: "item = <DoctestItem 'xdoc.txt'>"
E           and: ''
E           and: '    @pytest.mark.hookwrapper'
E           and: '    def pytest_runtest_call(item):'
E           and: '>       if not is_hypothesis_test(item.function):'
E           and: "E       AttributeError: 'DoctestItem' object has no attribute 'function'"
E           and: ''
E           and: 'c:\\pytest\\.env35\\lib\\site-packages\\hypothesis\\extra\\pytestplugin.py:76: AttributeError'
E           and: '========================== 2 failed in 0.25 seconds ==========================='
E           and: ''
E       remains unmatched: '*2 passed*'

C:\pytest\testing\test_doctest.py:124: Failed
---------------------------- Captured stdout call -----------------------------
============================= test session starts =============================
platform win32 -- Python 3.5.0, pytest-3.0.3.dev0, py-1.4.31, pluggy-0.3.1
rootdir: C:\Users\Bruno\AppData\Local\Temp\pytest-of-Bruno\pytest-4992\testdir\test_multiple_patterns0, inifile: 
plugins: hypothesis-3.5.1
collected 2 items

test.foo F
xdoc.txt F

================================== FAILURES ===================================
_____________________________ [doctest] test.foo ______________________________

self = <CallInfo when='call' exception: 'DoctestItem' object has no attribute 'function'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x04BDE468>
when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
>           self.result = func()

c:\pytest\_pytest\runner.py:163: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

c:\pytest\_pytest\runner.py:151: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_HookCaller 'pytest_runtest_call'>
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'test.foo'>}

    def __call__(self, **kwargs):
        assert not self.is_historic()
>       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

c:\pytest\_pytest\vendored_packages\pluggy.py:724: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.config.PytestPluginManager object at 0x04CD1050>
hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'test.foo'>}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook, methods, kwargs)

c:\pytest\_pytest\vendored_packages\pluggy.py:338: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._TracedHookExecution object at 0x04BE4170>
hook = <_HookCaller 'pytest_runtest_call'>
hook_impls = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'test.foo'>}

    def __call__(self, hook, hook_impls, kwargs):
        self.before(hook.name, hook_impls, kwargs)
        outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))
        self.after(outcome, hook.name, hook_impls, kwargs)
>       return outcome.get_result()

c:\pytest\_pytest\vendored_packages\pluggy.py:301: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x04C34DD0>

    def get_result(self):
        if self.excinfo is None:
            return self.result
        else:
            ex = self.excinfo
            if _py3:
>               raise ex[1].with_traceback(ex[2])

c:\pytest\_pytest\vendored_packages\pluggy.py:278: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x04C34DD0>
func = <function _TracedHookExecution.__call__.<locals>.<lambda> at 0x04BDE858>

    def __init__(self, func):
        try:
>           self.result = func()

c:\pytest\_pytest\vendored_packages\pluggy.py:264: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))

c:\pytest\_pytest\vendored_packages\pluggy.py:299: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'test.foo'>}

    self._inner_hookexec = lambda hook, methods, kwargs: \
>       _MultiCall(methods, kwargs, hook.spec_opts).execute()

c:\pytest\_pytest\vendored_packages\pluggy.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>

    def execute(self):
        all_kwargs = self.kwargs
        self.results = results = []
        firstresult = self.specopts.get("firstresult")

        while self.hook_impls:
            hook_impl = self.hook_impls.pop()
            args = [all_kwargs[argname] for argname in hook_impl.argnames]
            if hook_impl.hookwrapper:
>               return _wrapped_call(hook_impl.function(*args), self.execute)

c:\pytest\_pytest\vendored_packages\pluggy.py:595: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

wrap_controller = <generator object pytest_runtest_call at 0x04C31F60>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def _wrapped_call(wrap_controller, func):
        """ Wrap calling to a function with a generator which needs to yield
        exactly once.  The yield point will trigger calling the wrapped function
        and return its _CallOutcome to the yield point.  The generator then needs
        to finish (raise StopIteration) in order for the wrapped call to complete.
        """
        try:
            next(wrap_controller)   # first yield
        except StopIteration:
            _raise_wrapfail(wrap_controller, "did not yield")
        call_outcome = _CallOutcome(func)
        try:
            wrap_controller.send(call_outcome)
            _raise_wrapfail(wrap_controller, "has second yield")
        except StopIteration:
            pass
>       return call_outcome.get_result()

c:\pytest\_pytest\vendored_packages\pluggy.py:253: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x04C34F30>

    def get_result(self):
        if self.excinfo is None:
            return self.result
        else:
            ex = self.excinfo
            if _py3:
>               raise ex[1].with_traceback(ex[2])

c:\pytest\_pytest\vendored_packages\pluggy.py:278: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x04C34F30>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def __init__(self, func):
        try:
>           self.result = func()

c:\pytest\_pytest\vendored_packages\pluggy.py:264: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>

    def execute(self):
        all_kwargs = self.kwargs
        self.results = results = []
        firstresult = self.specopts.get("firstresult")

        while self.hook_impls:
            hook_impl = self.hook_impls.pop()
            args = [all_kwargs[argname] for argname in hook_impl.argnames]
            if hook_impl.hookwrapper:
>               return _wrapped_call(hook_impl.function(*args), self.execute)

c:\pytest\_pytest\vendored_packages\pluggy.py:595: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

wrap_controller = <generator object pytest_runtest_call at 0x04C31FC0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'test.foo'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def _wrapped_call(wrap_controller, func):
        """ Wrap calling to a function with a generator which needs to yield
        exactly once.  The yield point will trigger calling the wrapped function
        and return its _CallOutcome to the yield point.  The generator then needs
        to finish (raise StopIteration) in order for the wrapped call to complete.
        """
        try:
>           next(wrap_controller)   # first yield

c:\pytest\_pytest\vendored_packages\pluggy.py:244: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

item = <DoctestItem 'test.foo'>

    @pytest.mark.hookwrapper
    def pytest_runtest_call(item):
>       if not is_hypothesis_test(item.function):
E       AttributeError: 'DoctestItem' object has no attribute 'function'

c:\pytest\.env35\lib\site-packages\hypothesis\extra\pytestplugin.py:76: AttributeError
_____________________________ [doctest] xdoc.txt ______________________________

self = <CallInfo when='call' exception: 'DoctestItem' object has no attribute 'function'>
func = <function call_runtest_hook.<locals>.<lambda> at 0x04BDEAE0>
when = 'call'

    def __init__(self, func, when):
        #: context of invocation: one of "setup", "call",
        #: "teardown", "memocollect"
        self.when = when
        self.start = time()
        try:
>           self.result = func()

c:\pytest\_pytest\runner.py:163: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   return CallInfo(lambda: ihook(item=item, **kwds), when=when)

c:\pytest\_pytest\runner.py:151: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_HookCaller 'pytest_runtest_call'>
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'xdoc.txt'>}

    def __call__(self, **kwargs):
        assert not self.is_historic()
>       return self._hookexec(self, self._nonwrappers + self._wrappers, kwargs)

c:\pytest\_pytest\vendored_packages\pluggy.py:724: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.config.PytestPluginManager object at 0x04CD1050>
hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'xdoc.txt'>}

    def _hookexec(self, hook, methods, kwargs):
        # called from all hookcaller instances.
        # enable_tracing will set its own wrapping function at self._inner_hookexec
>       return self._inner_hookexec(hook, methods, kwargs)

c:\pytest\_pytest\vendored_packages\pluggy.py:338: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._TracedHookExecution object at 0x04BE4170>
hook = <_HookCaller 'pytest_runtest_call'>
hook_impls = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'xdoc.txt'>}

    def __call__(self, hook, hook_impls, kwargs):
        self.before(hook.name, hook_impls, kwargs)
        outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))
        self.after(outcome, hook.name, hook_impls, kwargs)
>       return outcome.get_result()

c:\pytest\_pytest\vendored_packages\pluggy.py:301: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x0555B3D0>

    def get_result(self):
        if self.excinfo is None:
            return self.result
        else:
            ex = self.excinfo
            if _py3:
>               raise ex[1].with_traceback(ex[2])

c:\pytest\_pytest\vendored_packages\pluggy.py:278: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x0555B3D0>
func = <function _TracedHookExecution.__call__.<locals>.<lambda> at 0x04BDED20>

    def __init__(self, func):
        try:
>           self.result = func()

c:\pytest\_pytest\vendored_packages\pluggy.py:264: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   outcome = _CallOutcome(lambda: self.oldcall(hook, hook_impls, kwargs))

c:\pytest\_pytest\vendored_packages\pluggy.py:299: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

hook = <_HookCaller 'pytest_runtest_call'>
methods = [<_pytest.vendored_packages.pluggy.HookImpl object at 0x04CD1BF0>]
kwargs = {'__multicall__': <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>, 'item': <DoctestItem 'xdoc.txt'>}

    self._inner_hookexec = lambda hook, methods, kwargs: \
>       _MultiCall(methods, kwargs, hook.spec_opts).execute()

c:\pytest\_pytest\vendored_packages\pluggy.py:333: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>

    def execute(self):
        all_kwargs = self.kwargs
        self.results = results = []
        firstresult = self.specopts.get("firstresult")

        while self.hook_impls:
            hook_impl = self.hook_impls.pop()
            args = [all_kwargs[argname] for argname in hook_impl.argnames]
            if hook_impl.hookwrapper:
>               return _wrapped_call(hook_impl.function(*args), self.execute)

c:\pytest\_pytest\vendored_packages\pluggy.py:595: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

wrap_controller = <generator object pytest_runtest_call at 0x04C41A80>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def _wrapped_call(wrap_controller, func):
        """ Wrap calling to a function with a generator which needs to yield
        exactly once.  The yield point will trigger calling the wrapped function
        and return its _CallOutcome to the yield point.  The generator then needs
        to finish (raise StopIteration) in order for the wrapped call to complete.
        """
        try:
            next(wrap_controller)   # first yield
        except StopIteration:
            _raise_wrapfail(wrap_controller, "did not yield")
        call_outcome = _CallOutcome(func)
        try:
            wrap_controller.send(call_outcome)
            _raise_wrapfail(wrap_controller, "has second yield")
        except StopIteration:
            pass
>       return call_outcome.get_result()

c:\pytest\_pytest\vendored_packages\pluggy.py:253: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x0555B290>

    def get_result(self):
        if self.excinfo is None:
            return self.result
        else:
            ex = self.excinfo
            if _py3:
>               raise ex[1].with_traceback(ex[2])

c:\pytest\_pytest\vendored_packages\pluggy.py:278: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_pytest.vendored_packages.pluggy._CallOutcome object at 0x0555B290>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def __init__(self, func):
        try:
>           self.result = func()

c:\pytest\_pytest\vendored_packages\pluggy.py:264: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

self = <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>

    def execute(self):
        all_kwargs = self.kwargs
        self.results = results = []
        firstresult = self.specopts.get("firstresult")

        while self.hook_impls:
            hook_impl = self.hook_impls.pop()
            args = [all_kwargs[argname] for argname in hook_impl.argnames]
            if hook_impl.hookwrapper:
>               return _wrapped_call(hook_impl.function(*args), self.execute)

c:\pytest\_pytest\vendored_packages\pluggy.py:595: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

wrap_controller = <generator object pytest_runtest_call at 0x04C412D0>
func = <bound method _MultiCall.execute of <_MultiCall 0 results, 1 meths, kwargs={'item': <DoctestItem 'xdoc.txt'>, '__multicall__': <_MultiCall 0 results, 1 meths, kwargs={...}>}>>

    def _wrapped_call(wrap_controller, func):
        """ Wrap calling to a function with a generator which needs to yield
        exactly once.  The yield point will trigger calling the wrapped function
        and return its _CallOutcome to the yield point.  The generator then needs
        to finish (raise StopIteration) in order for the wrapped call to complete.
        """
        try:
>           next(wrap_controller)   # first yield

c:\pytest\_pytest\vendored_packages\pluggy.py:244: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

item = <DoctestItem 'xdoc.txt'>

    @pytest.mark.hookwrapper
    def pytest_runtest_call(item):
>       if not is_hypothesis_test(item.function):
E       AttributeError: 'DoctestItem' object has no attribute 'function'

c:\pytest\.env35\lib\site-packages\hypothesis\extra\pytestplugin.py:76: AttributeError
========================== 2 failed in 0.25 seconds ===========================
!!!!!!!!!!!!!!!!!!! Interrupted: stopping after 1 failures !!!!!!!!!!!!!!!!!!!!
===================== 1 failed, 7 passed in 1.34 seconds ======================

Installing hypothesis 3.5.0 fixes the issue.

@alexwlchan
Copy link
Contributor

alexwlchan commented Sep 25, 2016

At a very quick glance, this looks like it might be a dupe of #367 – the error message is the same, and it looks like doctests and py.test are involved.

Hypothesis 3.5.2 is supposed to fix that bug – have you tried running the py.test test suite with that version? Does that fix the problem, or is this a different error?

@nicoddemus
Copy link
Author

Thanks for the info!

It seems 3.5.2 has not been released to PyPI yet, but I can confirm that the test suite works with:

pip install git+https://github.com/HypothesisWorks/[email protected]

I'm closing this since it is just a matter of publishing the release. 😁

@DRMacIver
Copy link
Member

Whoops, it was supposed to be! Not sure why it wasn't. Sorry about that. It's now pushed.

@nicoddemus
Copy link
Author

Thanks @DRMacIver! 😁

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants