Skip to content

Fixed isolation of test_showmigrations_unmigrated_app(). - #14300

Merged
felixxm merged 1 commit into
django:mainfrom
felixxm:test_migrate_with_system_checks-isolation
Apr 22, 2021
Merged

felixxm merged 1 commit into
django:mainfrom
felixxm:test_migrate_with_system_checks-isolation

Conversation

@felixxm

@felixxm felixxm commented Apr 22, 2021

Copy link
Copy Markdown
Member
$ ./runtests.py migrations.test_commands.MigrateTests.test_showmigrations_unmigrated_app migrations.test_commands.MigrateTests.test_migrate_with_system_checks --parallel=1
Testing against Django installed in '/django/django'
Found 2 tests.
Creating test database for alias 'default'...
Creating test database for alias 'other'...
System check identified no issues (0 silenced).
.E
======================================================================
ERROR: test_migrate_with_system_checks (migrations.test_commands.MigrateTests)
----------------------------------------------------------------------
Traceback (most recent call last):
  File "/django/django/test/utils.py", line 430, in inner
    return func(*args, **kwargs)
  File "/django/tests/migrations/test_commands.py", line 78, in test_migrate_with_system_checks
    call_command('migrate', skip_checks=False, no_color=True, stdout=out)
  File "/django/django/core/management/__init__.py", line 181, in call_command
    return command.execute(*args, **defaults)
  File "/django/django/core/management/base.py", line 398, in execute
    output = self.handle(*args, **options)
  File "/django/django/core/management/base.py", line 89, in wrapped
    res = handle_func(*args, **kwargs)
  File "/django/django/core/management/commands/migrate.py", line 75, in handle
    self.check(databases=[database])
  File "/django/django/core/management/base.py", line 469, in check
    raise SystemCheckError(msg)
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
unmigrated_app.SillyModel.silly_tribble: (fields.E307) The field unmigrated_app.SillyModel.silly_tribble was declared with a lazy reference to 'migrations.tribble', but app 'migrations' isn't installed.


----------------------------------------------------------------------
Ran 2 tests in 0.013s

FAILED (errors=1)
Destroying test database for alias 'default'...
Destroying test database for alias 'other'...

@carltongibson carltongibson left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, nice. Thanks. 👍

@felixxm
felixxm force-pushed the test_migrate_with_system_checks-isolation branch from db7da50 to 1044676 Compare April 22, 2021 11:56
@felixxm

felixxm commented Apr 22, 2021

Copy link
Copy Markdown
Member Author

@carltongibson Thanks for checking 👍 I also changed del to pop() in test_regression_22823_unmigrated_fk_to_migrated_model(), we don't want to create a new isolation issue 😄

@carltongibson

Copy link
Copy Markdown
Member

@felixxm Nice. :)

@felixxm
felixxm merged commit 90916f0 into django:main Apr 22, 2021
@felixxm
felixxm deleted the test_migrate_with_system_checks-isolation branch April 22, 2021 15:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants