mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-19 11:16:24 +00:00
test_dirnode.py: simplejson-1.7.1 incorrectly rounds floats to two decimal places. Don't let this bug flunk the timestamp test.
This commit is contained in:
parent
7123c9d875
commit
09cf1e2a8a
@ -333,8 +333,15 @@ class Dirnode(unittest.TestCase, testutil.ShouldFailMixin):
|
|||||||
def _start(res):
|
def _start(res):
|
||||||
self._start_timestamp = time.time()
|
self._start_timestamp = time.time()
|
||||||
d.addCallback(_start)
|
d.addCallback(_start)
|
||||||
|
# simplejson-1.7.1 (as shipped on Ubuntu 'gutsy') rounds all
|
||||||
|
# floats to hundredeths (it uses str(num) instead of repr(num)).
|
||||||
|
# simplejson-1.7.3 does not have this bug. To prevent this bug
|
||||||
|
# from causing the test to fail, stall for more than a few
|
||||||
|
# hundrededths of a second.
|
||||||
|
d.addCallback(self.stall, 0.1)
|
||||||
d.addCallback(lambda res: n.add_file("timestamps",
|
d.addCallback(lambda res: n.add_file("timestamps",
|
||||||
upload.Data("stamp me")))
|
upload.Data("stamp me")))
|
||||||
|
d.addCallback(self.stall, 0.1)
|
||||||
def _stop(res):
|
def _stop(res):
|
||||||
self._stop_timestamp = time.time()
|
self._stop_timestamp = time.time()
|
||||||
d.addCallback(_stop)
|
d.addCallback(_stop)
|
||||||
|
Loading…
Reference in New Issue
Block a user