RuntimeError: generator raised StopIteration in python 3.7 in unit test

Bug #1789239 reported by Thomas Goirand on 2018-08-27
10
This bug affects 2 people
Affects Status Importance Assigned to Milestone
Murano
Medium
zhurong

Bug Description

Hi,

When building Murano Rocky RC1 in Debian Sid, the below unit test fails. This is specific to Python 3.7, which is available in both Ubuntu and Debian.

======================================================================
FAIL: murano.tests.unit.dsl.test_helpers.TestDSLHelpers.test_walk_gc_with_towards_true
murano.tests.unit.dsl.test_helpers.TestDSLHelpers.test_walk_gc_with_towards_true
----------------------------------------------------------------------
_StringException: Traceback (most recent call last):
  File "/<<PKGBUILDDIR>>/murano/dsl/helpers.py", line 741, in walk_gc
    [(t, trace + [item]) for t in gc.get_referrers(item)]
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 1062, in __call__
    return _mock_self._mock_call(*args, **kwargs)
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 1121, in _mock_call
    result = next(effect)
StopIteration

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
  File "/usr/lib/python3/dist-packages/mock/mock.py", line 1305, in patched
    return func(*args, **keywargs)
  File "/<<PKGBUILDDIR>>/murano/tests/unit/dsl/test_helpers.py", line 313, in test_walk_gc_with_towards_true
    for obj in helpers.walk_gc(first_obj, True, handler):
RuntimeError: generator raised StopIteration

zhurong (zhu-rong) wrote :

murano master branch fixed this bug in: https://review.openstack.org/#/c/637346/

Changed in murano:
status: New → Confirmed
importance: Undecided → Medium
assignee: nobody → zhurong (zhu-rong)
zhurong (zhu-rong) on 2019-02-26
Changed in murano:
status: Confirmed → In Progress

Reviewed: https://review.openstack.org/639244
Committed: https://git.openstack.org/cgit/openstack/murano/commit/?id=69b6bf358693e44f20fd5f8f7d07fdabaa2cc647
Submitter: Zuul
Branch: stable/rocky

commit 69b6bf358693e44f20fd5f8f7d07fdabaa2cc647
Author: zhurong <email address hidden>
Date: Sat Feb 16 10:32:00 2019 +0800

    Fix py37 unit test error

    Closes-bug: #1789239
    Change-Id: If252c58546a60630dff9427acb9a6ff2cc8244ca
    (cherry picked from commit 9f4287ccc3f3ac467f56dc8bd12d3a35f03867c1)

tags: added: in-stable-rocky
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers