Opened 20 months ago

Closed 20 months ago

Last modified 20 months ago

#33887 closed Bug (fixed)

test_fails_squash_migration_manual_porting fails in the assert

Reported by: Alberto Planas Owned by: Alberto Planas
Component: Migrations Version: 4.1
Severity: Release blocker Keywords:
Cc: Triage Stage: Ready for checkin
Has patch: yes Needs documentation: no
Needs tests: no Patch needs improvement: no
Easy pickings: yes UI/UX: no

Description

Seems that the URL in the test is checking for the dev version.

[ 380s] ======================================================================
[ 380s] FAIL: test_fails_squash_migration_manual_porting (migrations.test_commands.OptimizeMigrationTests)
[ 380s] ----------------------------------------------------------------------
[ 380s] Traceback (most recent call last):
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 60, in testPartExecutor
[ 380s] yield
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 676, in run
[ 380s] self._callTestMethod(testMethod)
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 633, in _callTestMethod
[ 380s] method()
[ 380s] File "/home/abuild/rpmbuild/BUILD/Django-4.1/tests/migrations/test_commands.py", line 3015, in test_fails_squash_migration_manual_porting
[ 380s] call_command("optimizemigration", "migrations", "0004", stdout=out)
[ 380s] File "/usr/lib/python3.8/contextlib.py", line 131, in exit
[ 380s] self.gen.throw(type, value, traceback)
[ 380s] File "/home/abuild/rpmbuild/BUILD/Django-4.1/django/test/testcases.py", line 879, in _assert_raises_or_warns_cm
[ 380s] self.assertIn(expected_message, str(getattr(cm, cm_attr)))
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 1179, in assertIn
[ 380s] self.fail(self._formatMessage(msg, standardMsg))
[ 380s] File "/usr/lib/python3.8/unittest/case.py", line 753, in fail
[ 380s] raise self.failureException(msg)
[ 380s] AssertionError: 'Migration will require manual porting but is already a squashed migration.\nTransition to a normal migration first: https://docs.djangoproject.com/en/dev/topics/migrations/#squashing-migrations' not found in 'Migration will require manual porting but is already a squashed migration.\nTransition to a normal migration first: https://docs.djangoproject.com/en/4.1/topics/migrations/#squashing-migrations'
[ 380s]

Change History (6)

comment:1 by Carlton Gibson, 20 months ago

Severity: NormalRelease blocker
Triage Stage: UnreviewedAccepted

Yes... Running against the release version hit's this.

% git checkout 4.1  
% ./runtests.py migrations
...
AssertionError: 'Migration will require manual porting but is already a squashed migration.\nTransition to a normal migration first: https://docs.djangoproject.com/en/dev/topics/migrations/#squashing-migrations' not found in 'Migration will require manual porting but is already a squashed migration.\nTransition to a normal migration first: https://docs.djangoproject.com/en/4.1/topics/migrations/#squashing-migrations'

Good spot. Thanks Alberto

comment:3 by Alberto Planas, 20 months ago

Has patch: set

comment:4 by Mariusz Felisiak, 20 months ago

Owner: changed from nobody to Alberto Planas
Status: newassigned
Triage Stage: AcceptedReady for checkin

comment:5 by GitHub <noreply@…>, 20 months ago

Resolution: fixed
Status: assignedclosed

In 4e13b40a:

Fixed #33887 -- Fixed test_fails_squash_migration_manual_porting() on final tags.

Regression in 7c318a8bdd66f8c5241864c9970dddb525d0ca4c.

comment:6 by Mariusz Felisiak <felisiak.mariusz@…>, 20 months ago

In 9e9bdf8:

[4.1.x] Fixed #33887 -- Fixed test_fails_squash_migration_manual_porting() on final tags.

Regression in 7c318a8bdd66f8c5241864c9970dddb525d0ca4c.
Backport of 4e13b40a764cfdae50416338c5d077e9d9a6d0f1 from main

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