Opened 2 years ago

Last modified 2 years ago

#33633 closed Cleanup/optimization

test_reset_sequences fails for backends not supporting transactions — at Initial Version

Reported by: Xiang Zhang Owned by: nobody
Component: Core (Other) Version: 4.0
Severity: Normal Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: no UI/UX: no

Description

FAIL: test_reset_sequences (test_utils.test_testcase.TestTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/Users/zhangyangyu/repos/django-tidb/django_tests_dir/django/tests/test_utils/test_testcase.py", line 47, in test_reset_sequences
    old_reset_sequences = self.reset_sequences
  File "/opt/homebrew/Cellar/python@3.9/3.9.12/Frameworks/Python.framework/Versions/3.9/lib/python3.9/contextlib.py", line 126, in __exit__
    next(self.gen)
  File "/Users/zhangyangyu/repos/django-tidb/django_tests_dir/django/django/test/testcases.py", line 807, in _assert_raises_or_warns_cm
    yield cm
AssertionError: TypeError not raised

test_reset_sequences fails with above error if testing against backends not supporting transactions, like MySQL MyIASM engine.

Change History (0)

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