============================= test session starts ==============================
platform linux -- Python 3.7.0, pytest-3.6.3, py-1.5.4, pluggy-0.6.0
rootdir: /build/python-aspectlib/src/python-aspectlib, inifile: setup.cfg
plugins: capturelog-0.7
collected 157 items
docs/examples.rst . [ 0%]
docs/testing.rst . [ 1%]
docs/presentations/pycon.se-lightningtalk.rst . [ 1%]
docs/reference/aspectlib.rst F [ 2%]
src/aspectlib/__init__.py . [ 3%]
src/aspectlib/contrib.py . [ 3%]
src/aspectlib/debug.py F [ 4%]
src/aspectlib/test.py FF... [ 7%]
tests/test_aspectlib.py ......................s......................... [ 38%]
..s............F....FFF..FFF.... [ 58%]
tests/test_aspectlib_debug.py ......... [ 64%]
tests/test_aspectlib_py3.py FFFF [ 66%]
tests/test_aspectlib_test.py ......................F........ [ 86%]
tests/test_contrib.py .......F [ 91%]
tests/test_integrations.py ........... [ 98%]
tests/test_integrations_py3.py F. [100%]
=================================== FAILURES ===================================
___________________________ [doctest] aspectlib.rst ____________________________
094 ... print("Raised %r for %s/%s" % (exc, args, kwargs))
095 ... raise
096 ... else:
097 ... print("Returned %r for %s/%s" % (value, args, kwargs))
098
099 >>> @log_results
100 ... def weird_function():
101 ... yield 1
102 ... raise StopIteration('foobar') # in Python 3 it's the same as: return 'foobar'
103 >>> list(weird_function())
UNEXPECTED EXCEPTION: RuntimeError('generator raised StopIteration')
Traceback (most recent call last):
File "<doctest aspectlib.rst[9]>", line 4, in weird_function
StopIteration: foobar
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/usr/lib/python3.7/doctest.py", line 1329, in __run
compileflags, 1), test.globs)
File "<doctest aspectlib.rst[10]>", line 1, in <module>
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/py3support.py", line 41, in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
File "<doctest aspectlib.rst[8]>", line 4, in log_results
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/py3support.py", line 39, in advising_generator_wrapper_py3
result = yield from gen
RuntimeError: generator raised StopIteration
/build/python-aspectlib/src/python-aspectlib/docs/reference/aspectlib.rst:103: UnexpectedException
________________________ [doctest] aspectlib.debug.log _________________________
101 Example::
102
103 >>> @log(print_to=sys.stdout)
104 ... def a(weird=False):
105 ... if weird:
106 ... raise RuntimeError('BOOM!')
107 >>> a()
108 a() <<< ...
109 a => None
110 >>> try:
Expected:
a(weird=True) <<< ...
a ~ raised RuntimeError('BOOM!',)
Got:
a(weird=True) <<< aspectlib/__init__.py:257:advising_function_wrapper < aspectlib/debug.py:177:__call__ < <doctest aspectlib.debug.log[2]>:2:<module> < python3.7/doctest.py:1329:__run < python3.7/doctest.py:1475:run < python3.7/doctest.py:1838:run < _pytest/doctest.py:194:runtest < _pytest/runner.py:109:pytest_runtest_call < pluggy/callers.py:180:_multicall < pluggy/__init__.py:216:<lambda>
a ~ raised RuntimeError('BOOM!')
/build/python-aspectlib/src/python-aspectlib/src/aspectlib/debug.py:110: DocTestFailure
------------------------------ Captured log call -------------------------------
debug.py 217 CRITICAL a() <<< aspectlib/__init__.py:257:advising_function_wrapper < aspectlib/debug.py:177:__call__ < <doctest aspectlib.debug.log[1]>:1:<module> < python3.7/doctest.py:1329:__run < python3.7/doctest.py:1475:run < python3.7/doctest.py:1838:run < _pytest/doctest.py:194:runtest < _pytest/runner.py:109:pytest_runtest_call < pluggy/callers.py:180:_multicall < pluggy/__init__.py:216:<lambda>
debug.py 228 CRITICAL a => None
debug.py 217 CRITICAL a(weird=True) <<< aspectlib/__init__.py:257:advising_function_wrapper < aspectlib/debug.py:177:__call__ < <doctest aspectlib.debug.log[2]>:2:<module> < python3.7/doctest.py:1329:__run < python3.7/doctest.py:1475:run < python3.7/doctest.py:1838:run < _pytest/doctest.py:194:runtest < _pytest/runner.py:109:pytest_runtest_call < pluggy/callers.py:180:_multicall < pluggy/__init__.py:216:<lambda>
debug.py 224 CRITICAL a ~ raised RuntimeError('BOOM!')
_____________________ [doctest] aspectlib.test.LogCapture ______________________
079
080 Example::
081
082 >>> import logging
083 >>> logger = logging.getLogger('mylogger')
084 >>> with LogCapture(logger, level='INFO') as logs:
085 ... logger.debug("Message from debug: %s", 'somearg')
086 ... logger.info("Message from info: %s", 'somearg')
087 ... logger.error("Message from error: %s", 'somearg')
088 >>> logs.calls
Expected:
[('Message from info: %s', ('somearg',), 'INFO'), ('Message from error: %s', ('somearg',), 'ERROR')]
Got:
[('Message from error: %s', ('somearg',), 'ERROR')]
/build/python-aspectlib/src/python-aspectlib/src/aspectlib/test.py:88: DocTestFailure
------------------------------ Captured log call -------------------------------
<doctest aspectlib.test.LogCapture[2]> 4 ERROR Message from error: somearg
__________________ [doctest] aspectlib.test.Replay.unexpected __________________
EXAMPLE LOCATION UNKNOWN, not showing all tests of that example
??? >>> print(replay.unexpected)
Differences (unified diff with -expected +actual):
@@ -1,3 +1,3 @@
mymod.func('some arg') == None # returns
-mymod.badfunc() ** ValueError('boom!',) # raises
+mymod.badfunc() ** ValueError('boom!') # raises
<BLANKLINE>
/build/python-aspectlib/src/python-aspectlib/src/aspectlib/test.py:None: DocTestFailure
_________________ test_aspect_on_generator_raise_stopiteration _________________
tests/test_aspectlib.py:1389: in func
raise StopIteration('something')
E StopIteration: something
The above exception was the direct cause of the following exception:
tests/test_aspectlib.py:1392: in test_aspect_on_generator_raise_stopiteration
assert list(func()) == []
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1384: in aspect
val = yield aspectlib.Proceed
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
E RuntimeError: generator raised StopIteration
_________________ test_aspect_on_generator_result_from_aspect __________________
src/aspectlib/py3support.py:52: in advising_generator_wrapper_py3
raise StopIteration(advice.value)
E StopIteration: result
The above exception was the direct cause of the following exception:
tests/test_aspectlib.py:1503: in test_aspect_on_generator_result_from_aspect
next(gen)
E RuntimeError: generator raised StopIteration
_______________________ test_aspect_on_generator_result ________________________
tests/test_aspectlib.py:1520: in func
raise StopIteration('value')
E StopIteration: value
The above exception was the direct cause of the following exception:
tests/test_aspectlib.py:1522: in test_aspect_on_generator_result
assert list(func()) == ['something']
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1515: in aspect
result.append((yield aspectlib.Proceed))
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
E RuntimeError: generator raised StopIteration
___________________________ test_aspect_on_coroutine ___________________________
tests/test_aspectlib.py:1567: in test_aspect_on_coroutine
assert hist == ['before', 'the-return-value', 'after', 'finally', 'closed']
E AssertionError: assert ['before', 'e...ly', 'closed'] == ['before', 'th...ly', 'closed']
E At index 1 diff: 'error' != 'the-return-value'
E Right contains more items, first extra item: 'closed'
E Use -v to get the full diff
----------------------------- Captured stdout call -----------------------------
YIELD 100
GOT 0
YIELD 1
GOT 1
YIELD 2
GOT 2
[100, 1, 2, 'done']
['before', 'error', 'finally', 'closed']
________________________ test_aspect_chain_on_generator ________________________
tests/test_aspectlib.py:1598: in func
raise StopIteration(a)
E StopIteration: 3
The above exception was the direct cause of the following exception:
tests/test_aspectlib.py:1602: in test_aspect_chain_on_generator
result = pytest.raises(StopIteration, gen.__next__ if hasattr(gen, '__next__') else gen.next)
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1590: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1590: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1590: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
E RuntimeError: generator raised StopIteration
___________________ test_aspect_chain_on_generator_no_return ___________________
src/aspectlib/py3support.py:52: in advising_generator_wrapper_py3
raise StopIteration(advice.value)
E StopIteration: None
The above exception was the direct cause of the following exception:
tests/test_aspectlib.py:1622: in test_aspect_chain_on_generator_no_return
result = pytest.raises(StopIteration, gen.__next__)
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1609: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1609: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
E RuntimeError: generator raised StopIteration
_______________ test_aspect_chain_on_generator_no_return_advice ________________
tests/test_aspectlib.py:1639: in func
raise StopIteration(a)
E StopIteration: 3
The above exception was the direct cause of the following exception:
tests/test_aspectlib.py:1644: in test_aspect_chain_on_generator_no_return_advice
result = pytest.raises(StopIteration, gen.__next__)
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1632: in foo
yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1632: in foo
yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib.py:1632: in foo
yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
E RuntimeError: generator raised StopIteration
________________________ test_aspect_chain_on_generator ________________________
src/aspectlib/py3support.py:52: in advising_generator_wrapper_py3
raise StopIteration(advice.value)
E StopIteration: 2
The above exception was the direct cause of the following exception:
tests/test_aspectlib_py3.py:24: in test_aspect_chain_on_generator
result = pytest.raises(StopIteration, gen.__next__ if hasattr(gen, '__next__') else gen.next)
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib_py3.py:12: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib_py3.py:12: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
E RuntimeError: generator raised StopIteration
___________________ test_aspect_chain_on_generator_no_return ___________________
src/aspectlib/py3support.py:52: in advising_generator_wrapper_py3
raise StopIteration(advice.value)
E StopIteration: None
The above exception was the direct cause of the following exception:
tests/test_aspectlib_py3.py:43: in test_aspect_chain_on_generator_no_return
result = pytest.raises(StopIteration, gen.__next__)
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib_py3.py:31: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib_py3.py:31: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
E RuntimeError: generator raised StopIteration
__________________ test_aspect_chain_on_generator_yield_from ___________________
src/aspectlib/py3support.py:52: in advising_generator_wrapper_py3
raise StopIteration(advice.value)
E StopIteration: 2
The above exception was the direct cause of the following exception:
tests/test_aspectlib_py3.py:72: in test_aspect_chain_on_generator_yield_from
assert consume(func(0)) == 0
tests/test_aspectlib_py3.py:53: in consume
list(it())
tests/test_aspectlib_py3.py:51: in it
ret.append((yield from gen))
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib_py3.py:60: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib_py3.py:60: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
E RuntimeError: generator raised StopIteration
_____________ test_aspect_chain_on_generator_no_return_yield_from ______________
src/aspectlib/py3support.py:52: in advising_generator_wrapper_py3
raise StopIteration(advice.value)
E StopIteration: None
The above exception was the direct cause of the following exception:
tests/test_aspectlib_py3.py:89: in test_aspect_chain_on_generator_no_return_yield_from
assert consume(func(0)) is None
tests/test_aspectlib_py3.py:53: in consume
list(it())
tests/test_aspectlib_py3.py:51: in it
ret.append((yield from gen))
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib_py3.py:78: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
tests/test_aspectlib_py3.py:78: in foo
result = yield aspectlib.Proceed(arg + 1)
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
E RuntimeError: generator raised StopIteration
_______________ test_story_empty_play_proxy_class_missing_report _______________
tests/test_aspectlib_test.py:392: in test_story_empty_play_proxy_class_missing_report
assert replay.diff == """--- expected
E AssertionError: assert '--- expected... # returns\n' == '--- expected\... # returns\n'
E Skipping 224 identical leading characters in diff, use -v to show
E - ror((123,)) # raises
E + ror((123,),) # raises
E ? +
E +stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)
E +stuff_2.mix('a', 'b') == (0, 1, 'a', 'b') # returns
E +stuff_2.mix(3, 4) == (0, 1, 3, 4) # returns...
E
E ...Full output truncated (16 lines hidden), use '-vv' to show
----------------------------- Captured stdout call -----------------------------
STORY/REPLAY DIFF:
--- expected
+++ actual
@@ -0,0 +1,18 @@
+stuff_1 = test_pkg1.test_pkg2.test_mod.Stuff(1, 2)
+stuff_1.mix(3, 4) == (1, 2, 3, 4) # returns
+stuff_1.mix('a', 'b') == (1, 2, 'a', 'b') # returns
+stuff_1.raises(123) ** ValueError((123,)) # raises
+stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)
+stuff_2.mix('a', 'b') == (0, 1, 'a', 'b') # returns
+stuff_2.mix(3, 4) == (0, 1, 3, 4) # returns
+test_pkg1.test_pkg2.test_mod.target() == None # returns
+test_pkg1.test_pkg2.test_mod.raises('badarg') ** ValueError(('badarg',)) # raises
+stuff_2.raises(123) ** ValueError((123,)) # raises
+that_long_stuf_1 = test_pkg1.test_pkg2.test_mod.ThatLONGStuf(1)
+that_long_stuf_1.mix(2) == (1, 2) # returns
+that_long_stuf_2 = test_pkg1.test_pkg2.test_mod.ThatLONGStuf(3)
+that_long_stuf_2.mix(4) == (3, 4) # returns
+that_long_stuf_3 = test_pkg1.test_pkg2.test_mod.ThatLONGStuf(2)
+that_long_stuf_3.mix() == (2,) # returns
+that_long_stuf_3.meth() == None # returns
+that_long_stuf_3.mix(10) == (2, 10) # returns
ACTUAL:
stuff_1 = test_pkg1.test_pkg2.test_mod.Stuff(1, 2)
stuff_1.mix(3, 4) == (1, 2, 3, 4) # returns
stuff_1.mix('a', 'b') == (1, 2, 'a', 'b') # returns
stuff_1.raises(123) ** ValueError((123,)) # raises
stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)
stuff_2.mix('a', 'b') == (0, 1, 'a', 'b') # returns
stuff_2.mix(3, 4) == (0, 1, 3, 4) # returns
test_pkg1.test_pkg2.test_mod.target() == None # returns
test_pkg1.test_pkg2.test_mod.raises('badarg') ** ValueError(('badarg',)) # raises
stuff_2.raises(123) ** ValueError((123,)) # raises
that_long_stuf_1 = test_pkg1.test_pkg2.test_mod.ThatLONGStuf(1)
that_long_stuf_1.mix(2) == (1, 2) # returns
that_long_stuf_2 = test_pkg1.test_pkg2.test_mod.ThatLONGStuf(3)
that_long_stuf_2.mix(4) == (3, 4) # returns
that_long_stuf_3 = test_pkg1.test_pkg2.test_mod.ThatLONGStuf(2)
that_long_stuf_3.mix() == (2,) # returns
that_long_stuf_3.meth() == None # returns
that_long_stuf_3.mix(10) == (2, 10) # returns
"--- expected\n+++ actual\n@@ -0,0 +1,18 @@\n+stuff_1 = test_pkg1.test_pkg2.test_mod.Stuff(1, 2)\n+stuff_1.mix(3, 4) == (1, 2, 3, 4) # returns\n+stuff_1.mix('a', 'b') == (1, 2, 'a', 'b') # returns\n+stuff_1.raises(123) ** ValueError((123,)) # raises\n+stuff_2 = test_pkg1.test_pkg2.test_mod.Stuff(0, 1)\n+stuff_2.mix('a', 'b') == (0, 1, 'a', 'b') # returns\n+stuff_2.mix(3, 4) == (0, 1, 3, 4) # returns\n+test_pkg1.test_pkg2.test_mod.target() == None # returns\n+test_pkg1.test_pkg2.test_mod.raises('badarg') ** ValueError(('badarg',)) # raises\n+stuff_2.raises(123) ** ValueError((123,)) # raises\n+that_long_stuf_1 = test_pkg1.test_pkg2.test_mod.ThatLONGStuf(1)\n+that_long_stuf_1.mix(2) == (1, 2) # returns\n+that_long_stuf_2 = test_pkg1.test_pkg2.test_mod.ThatLONGStuf(3)\n+that_long_stuf_2.mix(4) == (3, 4) # returns\n+that_long_stuf_3 = test_pkg1.test_pkg2.test_mod.ThatLONGStuf(2)\n+that_long_stuf_3.mix() == (2,) # returns\n+that_long_stuf_3.meth() == None # returns\n+that_long_stuf_3.mix(10) == (2, 10) # returns\n"
_______________________________ test_with_class ________________________________
tests/test_contrib.py:106: in test_with_class
assert logcap.messages == [
E AssertionError: assert [('ERROR', '_... secs.'), ...] == [('ERROR', '__... secs.'), ...]
E At index 2 diff: ('ERROR', 'action((Connection@6, 2, 2), {}) raised exception Failed. 5 retries left. Sleeping 0 secs.') != ('INFO', 'connected!')
E Right contains more items, first extra item: ('INFO', 'connected!')
E Use -v to get the full diff
----------------------------- Captured stdout call -----------------------------
('ERROR', "__init__((Connection@1, 'to-something'), {}) raised exception Failed. 5 retries left. Sleeping 0 secs.")
('ERROR', "__init__((Connection@2, 'to-something'), {}) raised exception Failed. 4 retries left. Sleeping 0 secs.")
('ERROR', 'action((Connection@6, 2, 2), {}) raised exception Failed. 5 retries left. Sleeping 0 secs.')
('ERROR', 'action((Connection@7, 2, 2), {}) raised exception Failed. 4 retries left. Sleeping 0 secs.')
('ERROR', 'action((Connection@8, 2, 2), {}) raised exception Failed. 3 retries left. Sleeping 0 secs.')
('ERROR', 'action((Connection@12, 4, 4), {}) raised exception Failed. 5 retries left. Sleeping 0 secs.')
('ERROR', 'action((Connection@13, 4, 4), {}) raised exception Failed. 4 retries left. Sleeping 0 secs.')
('ERROR', 'action((Connection@14, 4, 4), {}) raised exception Failed. 3 retries left. Sleeping 0 secs.')
------------------------------ Captured log call -------------------------------
contrib.py 57 ERROR __init__((Connection@1, 'to-something'), {}) raised exception Failed. 5 retries left. Sleeping 0 secs.
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 45, in retry_aspect
yield
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/__init__.py", line 265, in advising_function_wrapper
result = cutpoint_function(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 78, in __init__
self.__connect()
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 83, in __connect
raise OSError("Failed")
OSError: Failed
contrib.py 57 ERROR __init__((Connection@2, 'to-something'), {}) raised exception Failed. 4 retries left. Sleeping 0 secs.
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 45, in retry_aspect
yield
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/__init__.py", line 265, in advising_function_wrapper
result = cutpoint_function(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 78, in __init__
self.__connect()
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 83, in __connect
raise OSError("Failed")
OSError: Failed
contrib.py 57 ERROR action((Connection@6, 2, 2), {}) raised exception Failed. 5 retries left. Sleeping 0 secs.
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 45, in retry_aspect
yield
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/__init__.py", line 265, in advising_function_wrapper
result = cutpoint_function(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 91, in action
raise OSError("Failed")
OSError: Failed
contrib.py 57 ERROR action((Connection@7, 2, 2), {}) raised exception Failed. 4 retries left. Sleeping 0 secs.
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 45, in retry_aspect
yield
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/__init__.py", line 265, in advising_function_wrapper
result = cutpoint_function(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 91, in action
raise OSError("Failed")
OSError: Failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 44, in retry_aspect
cleanup(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 83, in __connect
raise OSError("Failed")
OSError: Failed
contrib.py 57 ERROR action((Connection@8, 2, 2), {}) raised exception Failed. 3 retries left. Sleeping 0 secs.
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 45, in retry_aspect
yield
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/__init__.py", line 265, in advising_function_wrapper
result = cutpoint_function(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 91, in action
raise OSError("Failed")
OSError: Failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 44, in retry_aspect
cleanup(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 83, in __connect
raise OSError("Failed")
OSError: Failed
contrib.py 57 ERROR action((Connection@12, 4, 4), {}) raised exception Failed. 5 retries left. Sleeping 0 secs.
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 45, in retry_aspect
yield
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/__init__.py", line 265, in advising_function_wrapper
result = cutpoint_function(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 91, in action
raise OSError("Failed")
OSError: Failed
contrib.py 57 ERROR action((Connection@13, 4, 4), {}) raised exception Failed. 4 retries left. Sleeping 0 secs.
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 45, in retry_aspect
yield
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/__init__.py", line 265, in advising_function_wrapper
result = cutpoint_function(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 91, in action
raise OSError("Failed")
OSError: Failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 44, in retry_aspect
cleanup(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 83, in __connect
raise OSError("Failed")
OSError: Failed
contrib.py 57 ERROR action((Connection@14, 4, 4), {}) raised exception Failed. 3 retries left. Sleeping 0 secs.
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 45, in retry_aspect
yield
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/__init__.py", line 265, in advising_function_wrapper
result = cutpoint_function(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 91, in action
raise OSError("Failed")
OSError: Failed
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/build/python-aspectlib/src/python-aspectlib/src/aspectlib/contrib.py", line 44, in retry_aspect
cleanup(*args, **kwargs)
File "/build/python-aspectlib/src/python-aspectlib/tests/test_contrib.py", line 83, in __connect
raise OSError("Failed")
OSError: Failed
_______________________ test_decorate_asyncio_coroutine ________________________
tests/test_integrations_py3.py:24: in test_decorate_asyncio_coroutine
loop.run_until_complete(coro())
/usr/lib/python3.7/asyncio/base_events.py:568: in run_until_complete
return future.result()
/usr/lib/python3.7/asyncio/coroutines.py:123: in coro
res = yield from res
src/aspectlib/py3support.py:41: in advising_generator_wrapper_py3
advice = advisor.throw(*sys.exc_info())
src/aspectlib/debug.py:219: in advising_function
res = yield
src/aspectlib/py3support.py:39: in advising_generator_wrapper_py3
result = yield from gen
tests/test_integrations_py3.py:20: in coro
yield from asyncio.sleep(0.01)
E TypeError: cannot 'yield from' a coroutine object in a non-coroutine generator
------------------------------ Captured log call -------------------------------
debug.py 217 CRITICAL coro() <<< aspectlib/py3support.py:30:advising_generator_wrapper_py3 < asyncio/coroutines.py:123:coro
debug.py 224 CRITICAL coro ~ raised TypeError("cannot 'yield from' a coroutine object in a non-coroutine generator")
=========================== short test summary info ============================
FAIL docs/reference/aspectlib.rst::aspectlib.rst
FAIL src/aspectlib/debug.py::aspectlib.debug.log
FAIL src/aspectlib/test.py::aspectlib.test.LogCapture
FAIL src/aspectlib/test.py::aspectlib.test.Replay.unexpected
FAIL tests/test_aspectlib.py::test_aspect_on_generator_raise_stopiteration
FAIL tests/test_aspectlib.py::test_aspect_on_generator_result_from_aspect
FAIL tests/test_aspectlib.py::test_aspect_on_generator_result
FAIL tests/test_aspectlib.py::test_aspect_on_coroutine
FAIL tests/test_aspectlib.py::test_aspect_chain_on_generator
FAIL tests/test_aspectlib.py::test_aspect_chain_on_generator_no_return
FAIL tests/test_aspectlib.py::test_aspect_chain_on_generator_no_return_advice
FAIL tests/test_aspectlib_py3.py::test_aspect_chain_on_generator
FAIL tests/test_aspectlib_py3.py::test_aspect_chain_on_generator_no_return
FAIL tests/test_aspectlib_py3.py::test_aspect_chain_on_generator_yield_from
FAIL tests/test_aspectlib_py3.py::test_aspect_chain_on_generator_no_return_yield_from
FAIL tests/test_aspectlib_test.py::test_story_empty_play_proxy_class_missing_report
FAIL tests/test_contrib.py::test_with_class
FAIL tests/test_integrations_py3.py::test_decorate_asyncio_coroutine
SKIP [1] tests/test_aspectlib.py:460: condition: aspectlib.PY3
SKIP [1] tests/test_aspectlib.py:1193: condition: aspectlib.PY3
=============================== warnings summary ===============================
<undetermined location>
[pytest] section in setup.cfg files is deprecated, use [tool:pytest] instead.
pytest-capturelog plugin has been merged into the core, please remove it from your requirements.
tests/test_aspectlib.py::test_weave_wrong_module
/build/python-aspectlib/src/python-aspectlib/src/aspectlib/test.py:203: UserWarning: Setting test_aspectlib.MissingGlobal to <class 'test_aspectlib.MissingGlobal'>. There was no previous definition, probably patching the wrong module.
return self.__wrapped(*args, **kwargs)
-- Docs: http://doc.pytest.org/en/latest/warnings.html
========= 18 failed, 137 passed, 2 skipped, 3 warnings in 1.54 seconds =========