Closed
Bug 1142943
Opened 11 years ago
Closed 11 years ago
Class fixture loading for the win
Categories
(Marketplace Graveyard :: Code Quality, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
2015-04-21
People
(Reporter: eviljeff, Assigned: eviljeff)
Details
(Whiteboard: [qa-])
Django 1.8 changes TestCase to load fixtures once per class and then use atomic requests to roll back any changes made during the individual test. It also adds a cls.setUpTestData method that can be used for most of the set up current done in self.setUp. This should give test speed wins, especially for TestClass subclasses with many tests.
If we borrow that behaviour we can get the win now without waiting for a stable 1.8 release as a whole (and making all the necessary changes - note the work involved in the 1.6-1.7 upgrade).
Requirements:
- changes in base TestCase should be easily swap-out-able when we upgrade to 1.8 and its no longer necessary
- tests should be compatible with genuine 1.8 TestCase so significant rewrite is needed.
| Assignee | ||
Comment 1•11 years ago
|
||
... "tests should be compatible with genuine 1.8 TestCase so *NO* significant rewrite is needed."
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → awilliamson
Comment 2•11 years ago
|
||
This was merged in https://github.com/mozilla/zamboni/commit/1e7311da069e0a6d1106d3e0e5f6f8924400e896 but then reverted in https://github.com/mozilla/zamboni/commit/86c12a2e93ddd78b31dd92342beaa0fdfe57c643 because of issues with errors: any test error would then cause all the following tests to fail!
| Assignee | ||
Comment 3•11 years ago
|
||
2nd try at merging.
https://github.com/mozilla/zamboni/commit/d92a0aa4ac6d3129bf3b72b3a8a2a223ced22ef3
(nothing to QA - it only affects tests)
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Whiteboard: [qa-]
Target Milestone: --- → 2015-04-21
You need to log in
before you can comment on or make changes to this bug.
Description
•