From 80d38de52bb2721a7b44fce4057bcff571afc23a Mon Sep 17 00:00:00 2001 From: Jacob Walls Date: Sun, 25 Sep 2022 19:53:55 -0400 Subject: Fixed #34051 -- Made makemigrations --check exit before making migrations. --- tests/migrations/test_commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'tests') diff --git a/tests/migrations/test_commands.py b/tests/migrations/test_commands.py index 9900c7a35d..0117d1e4aa 100644 --- a/tests/migrations/test_commands.py +++ b/tests/migrations/test_commands.py @@ -2391,9 +2391,10 @@ class MakeMigrationsTests(MigrationTestBase): makemigrations --check should exit with a non-zero status when there are changes to an app requiring migrations. """ - with self.temporary_migration_module(): + with self.temporary_migration_module() as tmpdir: with self.assertRaises(SystemExit): call_command("makemigrations", "--check", "migrations", verbosity=0) + self.assertFalse(os.path.exists(tmpdir)) with self.temporary_migration_module( module="migrations.test_migrations_no_changes" -- cgit v1.3