Adapt tests so that not relying on undefined
behaviour. The app directories can appear in any order, we need to allow that in tests.
This commit is contained in:
1 parent
395379178b
commit
357f0aebf4
3 files changed
+50
-23
No files matched your search
@@ -18,6 +18,7 @@ import os
|
||||
import re
|
||||
from subprocess import Popen, PIPE
|
||||
import sys
|
||||
|
||||
from . import utils
|
||||
from .sql_analyser import analyse_sql_statements
|
||||
|
||||
@@ -186,7 +187,7 @@ class MigrationLinter(object):
|
||||
def _gather_all_migrations(self):
|
||||
migrations = []
|
||||
for root, dirs, files in os.walk(self.django_path):
|
||||
for file_name in files:
|
||||
for file_name in sorted(files):
|
||||
if os.path.basename(root) == self.MIGRATION_FOLDER_NAME and \
|
||||
file_name.endswith('.py') and \
|
||||
file_name != '__init__.py':
|
||||
|
||||
Reference in new issue
Block a user