diff options
| author | Tim Graham <timograham@gmail.com> | 2018-06-15 13:56:10 -0400 |
|---|---|---|
| committer | Tim Graham <timograham@gmail.com> | 2018-06-15 14:18:08 -0400 |
| commit | 63f90f55f30d599d601d729060cdb0ebd2abdeb8 (patch) | |
| tree | 7b77c0c0acf9762b641eea7b604a127cea6189e4 /tests/migrations/test_loader.py | |
| parent | fcc4e251dbc917118f73d7187ee2f4cbf3883f36 (diff) | |
Fixed #29498 -- Fixed a missing pyc test file in source distribution.
Diffstat (limited to 'tests/migrations/test_loader.py')
| -rw-r--r-- | tests/migrations/test_loader.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/tests/migrations/test_loader.py b/tests/migrations/test_loader.py index dcb6404818..71d3c9ca36 100644 --- a/tests/migrations/test_loader.py +++ b/tests/migrations/test_loader.py @@ -521,7 +521,12 @@ class PycLoaderTests(MigrationTestBase): MigrationLoader reraises ImportErrors caused by "bad magic number" pyc files with a more helpful message. """ - with self.temporary_migration_module(module='migrations.test_migrations_bad_pyc'): + with self.temporary_migration_module(module='migrations.test_migrations_bad_pyc') as migration_dir: + # The -tpl suffix is to avoid the pyc exclusion in MANIFEST.in. + os.rename( + os.path.join(migration_dir, '0001_initial.pyc-tpl'), + os.path.join(migration_dir, '0001_initial.pyc'), + ) msg = ( r"Couldn't import '\w+.migrations.0001_initial' as it appears " "to be a stale .pyc file." |
