@@ -341,6 +341,39 @@ def test_inner_south():
341
341
result = testdir .runpytest ('--tb=short' , '-v' , '-s' )
342
342
result .stdout .fnmatch_lines (['*test_inner_south*PASSED*' ])
343
343
344
+ @pytest .mark .django_project (extra_settings = """
345
+ INSTALLED_APPS += [ 'south', ]
346
+ SOUTH_TESTS_MIGRATE = True
347
+ SOUTH_MIGRATION_MODULES = {
348
+ 'app': 'tpkg.app.south_migrations',
349
+ }
350
+ """ )
351
+ def test_south_migrations_python_files_star (self , django_testdir_initial ):
352
+ """
353
+ Test for South migrations and tests imported via `*.py`.
354
+
355
+ This is meant to reproduce
356
+ https://github.com/pytest-dev/pytest-django/issues/158, but does not
357
+ fail.
358
+ """
359
+ testdir = django_testdir_initial
360
+ testdir .create_test_module ('''
361
+ import pytest
362
+
363
+ @pytest.mark.django_db
364
+ def test_inner_south():
365
+ pass
366
+ ''' , 'test.py' )
367
+ testdir .create_initial_south_migration ()
368
+
369
+ pytest_ini = testdir .create_test_module ("""
370
+ [pytest]
371
+ python_files=*.py""" , 'pytest.ini' )
372
+
373
+ result = testdir .runpytest ('--tb=short' , '-v' , '-s' , '-c' , pytest_ini )
374
+ result .stdout .fnmatch_lines (['*test_inner_south*PASSED*' ])
375
+ result .stdout .fnmatch_lines (['*mark_south_migration_forwards*' ])
376
+
344
377
345
378
class TestNativeMigrations (object ):
346
379
""" Tests for Django 1.7 Migrations """
0 commit comments