#5624: Add mechanism for associating fixtures with doctests
-------------------------------+--------------------------------------------
Reporter: [EMAIL PROTECTED] | Owner: nobody
Status: new | Component: Unit test system
Version: SVN | Resolution:
Keywords: | Stage: Accepted
Has_patch: 1 | Needs_docs: 0
Needs_tests: 0 | Needs_better_patch: 1
-------------------------------+--------------------------------------------
Comment (by jkocherhans):
So adding a {{{fixtures}}} attribute to the doctest is probably out of the
question since you can't add arbitrary attributes to strings. I've
attached a patch that loads data from a {{{fixtures}}} attribute is it is
found in the {{{DocTest}}} instance's {{{globs}}} attribute. This feels
pretty dirty, but it works. Maybe making {{{fixtures}}} into a double
under name might make it slightly less dirty, or at least make it harder
to accidentally load stuff. I dunno. I don't really see many other ways to
do this after digging into the doctest code though. If this is too nasty,
the ticket should probably just be closed.
--
Ticket URL: <http://code.djangoproject.com/ticket/5624#comment:2>
Django Code <http://code.djangoproject.com/>
The web framework for perfectionists with deadlines
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django updates" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/django-updates?hl=en
-~----------~----~----~----~------~----~------~--~---