Please add some sugar for reporting details from a fixture

Bug #640119 reported by James Westby
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Python Fixtures
Fix Released
High
Robert Collins

Bug Description

Hi,

When using fixtures they sometimes have some data that I want to see, usually
on failures, but perhaps any time. It would be great if they could easily supply
that data to testtools for reporting through it's details API.

The example I have right now is the log file from a server running in a different
process.

Thanks,

James

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

I suggest a simple details() call which should return an iterable or dict (perhaps dict ?) of details objects.

Changed in python-fixtures:
status: New → Incomplete
status: Incomplete → Triaged
importance: Undecided → High
Revision history for this message
James Westby (james-w) wrote : Re: [Bug 640119] Re: Please add some sugar for reporting details from a fixture

On Sat, 18 Sep 2010 03:02:55 -0000, Robert Collins <email address hidden> wrote:
> I suggest a simple details() call which should return an iterable or
> dict (perhaps dict ?) of details objects.

I would think get_details like mismatches, which returns a dict?

Would there be a use case for controlling whether the details are
attached only on failure, or always?

Thanks,

James

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

On Sun, Sep 19, 2010 at 2:30 AM, James Westby <email address hidden> wrote:
> On Sat, 18 Sep 2010 03:02:55 -0000, Robert Collins <email address hidden> wrote:
>> I suggest a simple details() call which should return an iterable or
>> dict (perhaps dict ?) of details objects.
>
> I would think get_details like mismatches, which returns a dict?
>
> Would there be a use case for controlling whether the details are
> attached only on failure, or always?

I think that that would apply to the test not the fixture? or perhaps
for some fixtures you want it different?

Revision history for this message
James Westby (james-w) wrote :

On Sat, 18 Sep 2010 20:25:19 -0000, Robert Collins <email address hidden> wrote:
> On Sun, Sep 19, 2010 at 2:30 AM, James Westby <email address hidden> wrote:
> > On Sat, 18 Sep 2010 03:02:55 -0000, Robert Collins <email address hidden> wrote:
> >> I suggest a simple details() call which should return an iterable or
> >> dict (perhaps dict ?) of details objects.
> >
> > I would think get_details like mismatches, which returns a dict?
> >
> > Would there be a use case for controlling whether the details are
> > attached only on failure, or always?
>
> I think that that would apply to the test not the fixture? or perhaps
> for some fixtures you want it different?

Maybe. Generally you only care on failure, but it is something that is
different to the mismatch interface, as they are only queried on
failure.

Thanks,

James

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

Sure; I think mainly I'm reticent to teach Fixtures about
success/failure. It seems a different concern to me.

Changed in python-fixtures:
milestone: none → 0.3.4
assignee: nobody → Robert Collins (lifeless)
status: Triaged → 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.