#36313: even with `reset_sequences=True` a class does not reset them on teardown
-----------------------------------+--------------------------------------
Reporter: anthony sottile | Owner: (none)
Type: Bug | Status: closed
Component: Testing framework | Version: dev
Severity: Normal | Resolution: worksforme
Keywords: reset_sequences | Triage Stage: Unreviewed
Has patch: 0 | Needs documentation: 0
Needs tests: 0 | Patch needs improvement: 0
Easy pickings: 0 | UI/UX: 0
-----------------------------------+--------------------------------------
Changes (by Jacob Walls):
* resolution: needsinfo => worksforme
Comment:
Thanks for the CC.
The `reset_sequence` attribute is
[https://docs.djangoproject.com/en/5.1/topics/testing/advanced/#django.test.TransactionTestCase.reset_sequences
doc'd] to affect test setup, not teardown, on the idea that test cases
that are sensitive to primary key ordering should be opting in to the
reset overhead by setting `reset_sequences=True`. So under the current
paradigm, the sequence state persisting after the test is expected.
Changing this, I think, would require an impact analysis (DEP-lite?) on
test case ordering and any usability or performance upsides from changing
the behavior you called out.
--
Ticket URL: <https://code.djangoproject.com/ticket/36313#comment:3>
Django <https://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 unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion visit
https://groups.google.com/d/msgid/django-updates/01070196716c12eb-3fc17e11-110f-4825-8710-29e105991817-000000%40eu-central-1.amazonses.com.