Re: RFS: python-simpy3/3.0.7+dfsg-1 [ITP]
On 2015-06-17 00:01, Larissa Reis wrote:
> After discussion on this list, I'm making the new simpy version a
> separate package (see thread starting from [1]). I still need a mentor
> to review and a sponsor for the package.
Uploaded. Thanks for working on this package!
I like, that people can move smoothly from SimPy 2 to simpy 3.
There is one error in the test suite. It is ignored during
build, so I ignore it, too. But please check it, this should
be fixed in a subsequent upload:
=============================================================================== FAILURES ===============================================================================
_______________________________________________________________________ test_exception_chaining ________________________________________________________________________
env = <simpy.core.Environment object at 0x7fd086165c90>
def test_exception_chaining(env):
"""Unhandled exceptions pass through the entire event stack. This must be
visible in the stacktrace of the exception.
"""
import textwrap, re
def child(env):
yield env.timeout(1)
raise RuntimeError('foo')
def parent(env):
child_proc = env.process(child(env))
yield child_proc
def grandparent(env):
parent_proc = env.process(parent(env))
yield parent_proc
env.process(grandparent(env))
try:
env.run()
pytest.fail('There should have been an exception')
except RuntimeError:
trace = traceback.format_exc()
expected = re.escape(textwrap.dedent("""\
Traceback (most recent call last):
File "...simpy/test/test_exceptions.py", line ..., in child
raise RuntimeError('foo')
RuntimeError: foo
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "...simpy/test/test_exceptions.py", line ..., in parent
yield child_proc
RuntimeError: foo
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "...simpy/test/test_exceptions.py", line ..., in grandparent
yield parent_proc
RuntimeError: foo
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "...simpy/test/test_exceptions.py", line ..., in test_exception_chaining
env.run()
File "...simpy/core.py", line ..., in run
self.step()
File "...simpy/core.py", line ..., in step
raise exc
RuntimeError: foo
""")).replace('\.\.\.', '.+')
> assert re.match(expected, trace), 'Traceback mismatch'
E AssertionError: Traceback mismatch
E assert None
E + where None = <function match at 0x7fd088e5ac80>('Traceback\\ \\(most\\ recent\\ call\\ last\\)\\:\\\n\\ \\ File\\ \\".+simpy\\/test\\/test\\_exceptions\\.py\\"\\,\\ l...File\\ \\".+simpy\\/core\\.py\\"\\,\\ line\\ .+\\,\\ in\\ step\\\n\\ \\ \\ \\ raise\\ exc\\\nRuntimeError\\:\\ foo\\\n', 'Traceback (most recent call last):\n File "/home/debacle/python-modules/python-simpy3/build-area/python-simpy3-3.0.7....py", line 137, in run\n self.step()\n File "simpy/core.py", line 229, in step\n raise exc\nRuntimeError: foo\n')
E + where <function match at 0x7fd088e5ac80> = <module 're' from '/usr/lib/python2.7/re.pyc'>.match
simpy/test/test_exceptions.py:127: AssertionError
=========================================================== 1 failed, 129 passed, 1 skipped in 2.28 seconds ============================================================
I: pybuild base:170: python3.4 -c 'import simpy; simpy.test()'
========================================================================= test session starts ==========================================================================
platform linux -- Python 3.4.3 -- py-1.4.28 -- pytest-2.7.0
Reply to: