|
@@ -1009,6 +1009,18 @@ class MakeMigrationsTests(MigrationTestBase):
|
|
|
with self.temporary_migration_module(module="migrations.test_migrations_no_changes"):
|
|
|
call_command("makemigrations", "--check", "migrations", verbosity=0)
|
|
|
|
|
|
+ def test_makemigrations_migration_path_output(self):
|
|
|
+ """
|
|
|
+ makemigrations should print the relative paths to the migrations unless
|
|
|
+ they are outside of the current tree, in which case the absolute path
|
|
|
+ should be shown.
|
|
|
+ """
|
|
|
+ out = six.StringIO()
|
|
|
+ apps.register_model('migrations', UnicodeModel)
|
|
|
+ with self.temporary_migration_module() as migration_dir:
|
|
|
+ call_command("makemigrations", "migrations", stdout=out)
|
|
|
+ self.assertIn(os.path.join(migration_dir, '0001_initial.py'), out.getvalue())
|
|
|
+
|
|
|
|
|
|
class SquashMigrationsTests(MigrationTestBase):
|
|
|
"""
|