[Python-modules-team] Bug#901526: python-django: FTBFS: FAIL: test_invalid (migrations.test_loader.PycLoaderTests)

Chris Lamb lamby at debian.org
Thu Jun 14 15:03:11 BST 2018


Hi Andreas,

> […]

This is the test in question:

    def test_invalid(self):
        """
        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'):
            msg = (
                r"Couldn't import '\w+.migrations.0001_initial' as it appears "
                "to be a stale .pyc file."
            )
            with self.assertRaisesRegex(ImportError, msg):
                MigrationLoader(connection)

We are likely deleting or otherwise refreshing the .pyc file. :)


Regards,

-- 
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      lamby at debian.org / chris-lamb.co.uk
       `-



More information about the Python-modules-team mailing list