Opened 14 years ago

Closed 14 years ago

Last modified 9 years ago

#14442 closed Uncategorized (wontfix)

During tests parse fixtures using setUpClass

Reported by: Alex Gaynor Owned by: Alex Gaynor
Component: Testing framework Version: dev
Severity: Normal Keywords:
Cc: Triage Stage: Accepted
Has patch: no Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

Now that we can do class level setup we should move most of the stuff (but particularly parsing of fixtures) into setUpClass.

Attachments (1)

t14442.diff (19.2 KB ) - added by Alex Gaynor 14 years ago.
Patch implements the outlines strategy, 25% gain on admin_views, negligible of the full test run. 6 failing tests.

Download all attachments as: .zip

Change History (7)

comment:1 by Alex Gaynor, 14 years ago

Component: UncategorizedTesting framework
Owner: changed from nobody to Alex Gaynor
Status: newassigned
Triage Stage: UnreviewedAccepted

comment:2 by Alex Gaynor, 14 years ago

Version: 1.2SVN

by Alex Gaynor, 14 years ago

Attachment: t14442.diff added

Patch implements the outlines strategy, 25% gain on admin_views, negligible of the full test run. 6 failing tests.

comment:3 by Alex Gaynor, 14 years ago

Resolution: wontfix
Status: assignedclosed

Wontfixing on the grounds that it's non-trivial and the observed gain is tiny.

comment:4 by for_d, 12 years ago

Easy pickings: unset
Severity: Normal
Type: Uncategorized
UI/UX: unset

I have a use case where I have a bunch of tests that never modify the data created in setUp(). They are also very heavy because they use a search index which is built from the database data. I would like to use setUpClass() to set up my test data and do the indexing updating, and tearDownClass() to wipe it. Fixtures in this case do not get loaded, as implied by the bug summary. I don't know if this is a sufficiently compelling case. The unittest module docs seem to imply that class and module fixtures aren't very bad.

comment:5 by Paul Garner, 9 years ago

It seems a shame this was marked 'wontfix' on the basis that it makes minimal difference to Django's own test suite... this would be useful for framework users' own test suites

Note: See TracTickets for help on using tickets.
Back to Top