mirror of
https://github.com/kovidgoyal/calibre.git
synced 2025-07-09 03:04:10 -04:00
Fix refresh() test failling on OS X because of file system resolution
This commit is contained in:
parent
562f8f16b4
commit
37484fb02c
@ -6,7 +6,7 @@ from __future__ import (unicode_literals, division, absolute_import,
|
|||||||
__license__ = 'GPL v3'
|
__license__ = 'GPL v3'
|
||||||
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
__copyright__ = '2013, Kovid Goyal <kovid at kovidgoyal.net>'
|
||||||
|
|
||||||
import inspect
|
import inspect, time
|
||||||
from io import BytesIO
|
from io import BytesIO
|
||||||
from repr import repr
|
from repr import repr
|
||||||
from functools import partial
|
from functools import partial
|
||||||
@ -126,6 +126,9 @@ class LegacyTest(BaseTest):
|
|||||||
' Test refreshing the view after a change to metadata.db '
|
' Test refreshing the view after a change to metadata.db '
|
||||||
db = self.init_legacy()
|
db = self.init_legacy()
|
||||||
db2 = self.init_legacy()
|
db2 = self.init_legacy()
|
||||||
|
# Ensure that the following change will actually update the timestamp
|
||||||
|
# on filesystems with one second resolution (OS X)
|
||||||
|
time.sleep(1)
|
||||||
self.assertEqual(db2.data.cache.set_field('title', {1:'xxx'}), set([1]))
|
self.assertEqual(db2.data.cache.set_field('title', {1:'xxx'}), set([1]))
|
||||||
db2.close()
|
db2.close()
|
||||||
del db2
|
del db2
|
||||||
|
Loading…
x
Reference in New Issue
Block a user