mirror of
https://github.com/django/django.git
synced 2025-10-23 21:59:11 +00:00
Fixed #29749 -- Made the migrations loader ignore files starting with a tilde or underscore.
Regression in 29150d5da8.
This commit is contained in:
@@ -500,6 +500,14 @@ class LoaderTests(TestCase):
|
||||
}
|
||||
self.assertEqual(plan, expected_plan)
|
||||
|
||||
@override_settings(MIGRATION_MODULES={'migrations': 'migrations.test_migrations_private'})
|
||||
def test_ignore_files(self):
|
||||
"""Files prefixed with underscore, tilde, or dot aren't loaded."""
|
||||
loader = MigrationLoader(connection)
|
||||
loader.load_disk()
|
||||
migrations = [name for app, name in loader.disk_migrations if app == 'migrations']
|
||||
self.assertEqual(migrations, ['0001_initial'])
|
||||
|
||||
|
||||
class PycLoaderTests(MigrationTestBase):
|
||||
|
||||
|
||||
Reference in New Issue
Block a user