On Thu, May 6, 2010 at 1:15 PM, Steve Willoughby <st...@alchemy.com> wrote:

> The unit test methods all take message arguments so if you just
> want to customize the reported error, that's easily done.
>
> something like:
>  self.assertEqual(self.file.tags[k], v, "Failure with key "+k)
>
> That's easiest.  If you really want a separate test for each, you
> may want to create a factory function which will generate the individual
> test methods when the testcase object is created.
>
> --steve


Looks like Steve answered the question you had for me,
 "self.assertEqual(self.file.tags[k], v, "Failure with key "+k)" I think
this is the best(how I would do it) solution, 1 test for files with a
meaningful report as to which file is the problem.

  *Vincent Davis
720-301-3003 *
vinc...@vincentdavis.net
 my blog <http://vincentdavis.net> |
LinkedIn<http://www.linkedin.com/in/vincentdavis>

On Thu, May 6, 2010 at 1:15 PM, Steve Willoughby <st...@alchemy.com> wrote:

> The unit test methods all take message arguments so if you just
> want to customize the reported error, that's easily done.
>
> something like:
>  self.assertEqual(self.file.tags[k], v, "Failure with key "+k)
>
> That's easiest.  If you really want a separate test for each, you
> may want to create a factory function which will generate the individual
> test methods when the testcase object is created.
>
> --steve
>
_______________________________________________
Tutor maillist  -  Tutor@python.org
To unsubscribe or change subscription options:
http://mail.python.org/mailman/listinfo/tutor

Reply via email to