id,summary,reporter,owner,description,type,status,priority,milestone,component,version,severity,resolution,keywords,cc,branch,changelog,apichanges,internalchanges 12310,lots of test failures with pysqlite file db backend in some Windows environment,Christian Boos,Christian Boos,"With Python 2.7.11 and sqlite3 2.6.0 (3.6.21), we get lots of errors like this one: {{{ ====================================================================== ERROR: test_author_full_name (trac.ticket.tests.notification.AttachmentNotificationTestCase) ---------------------------------------------------------------------- Traceback (most recent call last): File ""C:\projects\trac\trac\ticket\tests\notification.py"", line 1524, in tearDown shutil.rmtree(self.env.path) File ""C:\Python27-x64\lib\shutil.py"", line 252, in rmtree onerror(os.remove, fullname, sys.exc_info()) File ""C:\Python27-x64\lib\shutil.py"", line 250, in rmtree os.remove(fullname) WindowsError: [Error 32] The process cannot access the file because it is being used by another process: 'c:\\users\\appveyor\\appdata\\local\\temp\\1\\trac-tempenv-hjqqot\\test.db' }}} We see that using 32-bits or 64-bits Python 2.7.11. However, the problem doesn't happen with Python 2.6.6 and sqlite3 2.4.1 (3.5.9) and it also never happens when the in-memory version of SQLite is used (obviously, as the problem is with test.db still opened at the time we do the rmtree). Locally, I have these additional results: - reproduced with Python 2.7.9sl x86 (that's a Stackless python) - reproduced with Python 2.7.10 x64 and pysqlite 2.8.1 (3.7.5) - no errors with Python 2.6.5 ",defect,closed,normal,1.0.10,database backend,1.0dev,minor,fixed,appveyor sqlite rmtree,,,"Improve robustness of unit-tests on Windows, when the file-based SQLite backend is used.","Added `EnvironmentStub.reset_db_and_disk` method, for use in `tearDown` methods in unit-tests, when one wants to reset the database ''and'' remove the environment.",