combine_details blows up when there are duplicate details

Bug #895652 reported by Jonathan Lange on 2011-11-25
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Fixtures
Jonathan Lange

Bug Description

combine_details refers to advance_iterator, which is an unknown name. This means that whenever getDetails is called for duplicate details (say, a parent with 'traceback' and a child with 'traceback'), then combine_details will raise an error that looks like this:

ERROR: fixtures.tests.test_fixture.TestFixture.test_duplicate_details_are_disambiguated
Traceback (most recent call last):
  File "/home/jml/src/python-fixtures/busted-combine-details/lib/fixtures/tests/", line 176, in test_duplicate_details_are_disambiguated
    'foo-1': 'child-content',}, parent.getDetails())
  File "/home/jml/src/python-fixtures/busted-combine-details/lib/fixtures/", line 156, in getDetails
    combine_details(source.getDetails(), result)
  File "/home/jml/src/python-fixtures/busted-combine-details/lib/fixtures/", line 44, in combine_details
    new_name = '%s-%d' % (name, advance_iterator(disambiguator))
NameError: global name 'advance_iterator' is not defined

I believe this to be a Critical bug.

Related branches

Changed in python-fixtures:
status: New → Fix Released
assignee: nobody → Jonathan Lange (jml)
milestone: none → next
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers