gather_details evaluates details

Bug #801031 reported by Robert Collins
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
testtools
Fix Released
Wishlist
Jonathan Lange

Bug Description

This results in too-early evaluation when used in python-fixtures; what we need there is the conflict logic - evaluation can/should happen when a test case or something which is going to destroy the context wants to report on the details.

Tags: details
Revision history for this message
Jonathan Lange (jml) wrote :

Could you please break this down into expected; observed; how-to-repro?

Revision history for this message
Robert Collins (lifeless) wrote : Re: [Bug 801031] Re: gather_details evaluates details

On Mon, Jul 4, 2011 at 10:27 PM, Jonathan Lange <email address hidden> wrote:
> Could you please break this down into expected; observed; how-to-repro?

Its probably easiest to look at what I landed in fixtures;gavin reused
gather_details, but it causes early-evaluation which is only desirable
once: at the very end of a test right before teardown.

Jonathan Lange (jml)
tags: added: fixtures
tags: added: details
removed: fixtures
Revision history for this message
Jonathan Lange (jml) wrote :

Am guessing this is http://bazaar.launchpad.net/+branch/python-fixtures/revision/27 and that the difference is that gather_details calls _copy_content on source content, which is what evaluates the details.

test_details_from_child_fixtures_are_returned from the aforementioned diff is probably a good starting point for reproducing the bug.

Revision history for this message
Robert Collins (lifeless) wrote :

See also combine_details()

Revision history for this message
Jonathan Lange (jml) wrote :
Revision history for this message
Jonathan Lange (jml) wrote :

Marked as Incomplete because I think this bug is fixed but don't understand it well enough to mark it as such.

Changed in testtools:
status: Triaged → Incomplete
Revision history for this message
Jonathan Lange (jml) wrote :

This is Not A Bug, since python-fixtures *relies* on gather_details evaluating details. I've posted a patch that documents this behaviour: https://github.com/testing-cabal/testtools/pull/184

Changed in testtools:
status: Incomplete → In Progress
assignee: nobody → Jonathan Lange (jml)
Jonathan Lange (jml)
Changed in testtools:
status: In Progress → Fix Committed
milestone: none → next
Jonathan Lange (jml)
Changed in testtools:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.