[Git][NTPsec/ntpsec][master] Fixes tests for cook() to match new prettydate()

Ian Bruene gitlab at mg.gitlab.com
Sat Sep 9 16:46:08 UTC 2017


Ian Bruene pushed to branch master at NTPsec / ntpsec


Commits:
5b483d0b by Ian Bruene at 2017-09-09T11:44:42-05:00
Fixes tests for cook() to match new prettydate()

- - - - -


1 changed file:

- tests/pylib/test_util.py


Changes:

=====================================
tests/pylib/test_util.py
=====================================
--- a/tests/pylib/test_util.py
+++ b/tests/pylib/test_util.py
@@ -655,40 +655,53 @@ class TestPylibUtilMethods(unittest.TestCase):
                         ("0x40000000.00000000", "0x40000000.00000000"))))
             self.assertEqual(f(data),
                              "reftime=00000000.00000000 "
-                             "2036-02-07T00:28:16.000,\n"
+                             "2036-02-07T06:28:16.000Z,\n"
                              "clock=10000000.00000000 "
-                             "2044-08-09T22:52:32.000,\n"
+                             "2044-08-10T03:52:32.000Z,\n"
                              "org=20000000.00000000 "
-                             "2053-02-10T19:16:48.000,\n"
+                             "2053-02-11T01:16:48.000Z,\n"
                              "rec=30000000.00000000 "
-                             "2061-08-14T17:41:04.000,\n"
+                             "2061-08-14T22:41:04.000Z,\n"
                              "xmt=40000000.00000000 "
-                             "2070-02-15T14:05:20.000\n")
+                             "2070-02-15T20:05:20.000Z\n")
             # Test prettydates, with units
             self.assertEqual(f(data, showunits=True),
                              "reftime=00000000.00000000 "
-                             "2036-02-07T00:28:16.000,\n"
+                             "2036-02-07T06:28:16.000Z,\n"
                              "clock=10000000.00000000 "
-                             "2044-08-09T22:52:32.000,\n"
+                             "2044-08-10T03:52:32.000Z,\n"
                              "org=20000000.00000000 "
-                             "2053-02-10T19:16:48.000,\n"
+                             "2053-02-11T01:16:48.000Z,\n"
                              "rec=30000000.00000000 "
-                             "2061-08-14T17:41:04.000,\n"
+                             "2061-08-14T22:41:04.000Z,\n"
                              "xmt=40000000.00000000 "
-                             "2070-02-15T14:05:20.000\n")
+                             "2070-02-15T20:05:20.000Z\n")
             # Test wide terminal
             termsize = (160, 24)
             self.assertEqual(f(data),
                              "reftime=00000000.00000000 "
-                             "2036-02-07T00:28:16.000, "
+                             "2036-02-07T06:28:16.000Z, "
                              "clock=10000000.00000000 "
-                             "2044-08-09T22:52:32.000, "
+                             "2044-08-10T03:52:32.000Z, "
                              "org=20000000.00000000 "
-                             "2053-02-10T19:16:48.000,\n"
+                             "2053-02-11T01:16:48.000Z,\n"
                              "rec=30000000.00000000 "
-                             "2061-08-14T17:41:04.000, "
+                             "2061-08-14T22:41:04.000Z, "
                              "xmt=40000000.00000000 "
-                             "2070-02-15T14:05:20.000\n")
+                             "2070-02-15T20:05:20.000Z\n")
+            # Test narrow terminal
+            termsize = (40, 24)
+            self.assertEqual(f(data),
+                             "\nreftime=00000000.00000000 "
+                             "2036-02-07T06:28:16.000Z,\n"
+                             "clock=10000000.00000000 "
+                             "2044-08-10T03:52:32.000Z,\n"
+                             "org=20000000.00000000 "
+                             "2053-02-11T01:16:48.000Z,\n"
+                             "rec=30000000.00000000 "
+                             "2061-08-14T22:41:04.000Z,\n"
+                             "xmt=40000000.00000000 "
+                             "2070-02-15T20:05:20.000Z\n")
             termsize = (80, 24)
             # Test ex-obscure cooking
             data = od((("srcadr", ("1.1.1.1", "1.1.1.1")),



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5b483d0b881e5697f23bbf667a1820404478ca62

---
View it on GitLab: https://gitlab.com/NTPsec/ntpsec/commit/5b483d0b881e5697f23bbf667a1820404478ca62
You're receiving this email because of your account on gitlab.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170909/946e895a/attachment.html>


More information about the vc mailing list