Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(1161)

Unified Diff: tests/systemtime.py

Issue 337640043: [dfdatetime] Replace float with decimal for normalized timestamps. (Closed)
Patch Set: Replace float with decimal for normalized timestamps. Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: tests/systemtime.py
diff --git a/tests/systemtime.py b/tests/systemtime.py
index 518a1c417dc03c5f34df1bb9955c7dcf64b1153f..0afd1ab3c3b3a6ca877f32929853c0e0a6d98250 100644
--- a/tests/systemtime.py
+++ b/tests/systemtime.py
@@ -4,6 +4,7 @@
from __future__ import unicode_literals
+import decimal
import unittest
from dfdatetime import systemtime
@@ -72,7 +73,7 @@ class SystemtimeTest(unittest.TestCase):
system_time_tuple=(2010, 8, 4, 12, 20, 6, 31, 142))
normalized_timestamp = systemtime_object._GetNormalizedTimestamp()
- self.assertEqual(normalized_timestamp, 1281643591.142)
+ self.assertEqual(normalized_timestamp, decimal.Decimal('1281643591.142'))
systemtime_object = systemtime.Systemtime()

Powered by Google App Engine
RSS Feeds Recent Issues | This issue
This is Rietveld f62528b