I'm writing a plugin that adds to the functionality in the
simplemultiproject plugin and I'm struggling to run the tests in smp.
python setup.py test
However, many tests are failing. It looks like the environment upgrade isn't properly implemented in setUp.
On Friday, 11 November 2016 22:39:35 UTC+1, RjOllos wrote:
Certainly the tests are now found correctly. Thanks.
However, many tests are failing. It looks like the environment upgrade isn't properly implemented in setUp.
I've been doing some hacking around, and the EnvironmentStub class in trac does not seem to deal well with an environment upgrade.
In trac/env.py, the database manager shuts down all connections after an upgrade. The sqlite db for tests is in memory, is it not? Perhaps shutting it down also kills the db, and when the connection is reopened, it is empty?
If I comment out the DatabaseManager(self).shutdown() line, the results of the upgrade are there.
So to me, this looks like a bug in trac.