id summary reporter owner description type status priority milestone component version severity resolution keywords cc branch changelog apichanges internalchanges 12311 trac.ticket.tests.notification.NotificationTestCase fails with sqlite on Windows Christian Boos Jun Omae " {{{ ====================================================================== ERROR: test_from_author (trac.ticket.tests.notification.NotificationTestCase) Using the reporter or change author as the notification sender ---------------------------------------------------------------------- Traceback (most recent call last): File ""C:\projects\trac\trac\ticket\tests\notification.py"", line 480, in test_from_author ticket.save_changes('noname', 'Final changes') File ""C:\projects\trac\trac\ticket\model.py"", line 355, in save_changes old_db_values.get(name), db_values.get(name))) File ""C:\projects\trac\trac\db\util.py"", line 128, in execute cursor.execute(query, params if params is not None else []) File ""C:\projects\trac\trac\db\util.py"", line 61, in execute r = self.cursor.execute(sql_escape_percent(sql), args) File ""C:\projects\trac\trac\db\sqlite_backend.py"", line 82, in execute result = PyFormatCursor.execute(self, *args) File ""C:\projects\trac\trac\db\sqlite_backend.py"", line 60, in execute args or []) File ""C:\projects\trac\trac\db\sqlite_backend.py"", line 52, in _rollback_on_error return function(self, *args, **kwargs) IntegrityError: columns ticket, time, field are not unique }}} The reproducibility is not 100%. On 1.0-stable Python 2.6.6 and 2.7.11 both x86 and x64) were affected, but on trunk, it happened reliably with **x64** builds of Python only. So it happened with both in-memory and file based SQLite databases. I couldn't reproduce the problem locally." defect closed normal 1.0.10 database backend 1.0-stable minor fixed appveyor Fixed test failures on Windows in `trac.ticket.tests.notification.NotificationTestCase`. Added `datetime_now` and `time_now` methods which retrieve the precise current time under Windows 8+ and Windows Server 2012+.