[Git][NTPsec/ntpsec][master] 2 commits: test_util.py: conform to pep8

Gary E. Miller gitlab at mg.gitlab.com
Wed Jan 4 00:53:27 UTC 2017


Gary E. Miller pushed to branch master at NTPsec / ntpsec


Commits:
4dcd4eb1 by Gary E. Miller at 2017-01-03T16:50:52-08:00
test_util.py: conform to pep8

- - - - -
6303348b by Gary E. Miller at 2017-01-03T16:52:33-08:00
test_statfiles.py: conform to pep8

- - - - -


2 changed files:

- tests/pylib/test_statfiles.py
- tests/pylib/test_util.py


Changes:

=====================================
tests/pylib/test_statfiles.py
=====================================
--- a/tests/pylib/test_statfiles.py
+++ b/tests/pylib/test_statfiles.py
@@ -1,20 +1,27 @@
 import unittest
 import ntp.statfiles
 
+
 class TestPylibStatfilesMethods(unittest.TestCase):
 
     def test_iso_to_posix(self):
-        self.assertEqual(ntp.statfiles.iso_to_posix(1480999786), 1480999786)
-        self.assertEqual(ntp.statfiles.iso_to_posix("2016-12-06T04:49:46"), 1480999786)
+        self.assertEqual(ntp.statfiles.iso_to_posix(1480999786),
+                         1480999786)
+        self.assertEqual(ntp.statfiles.iso_to_posix("2016-12-06T04:49:46"),
+                         1480999786)
 
     def test_posix_to_iso(self):
-        self.assertEqual(ntp.statfiles.posix_to_iso(1480999786), "2016-12-06T04:49:46")
+        self.assertEqual(ntp.statfiles.posix_to_iso(1480999786),
+                         "2016-12-06T04:49:46")
 
     def test_iso_to_posix_inverts_posix_to_iso(self):
-        self.assertEqual(ntp.statfiles.iso_to_posix(ntp.statfiles.posix_to_iso(1480999786)), 1480999786)
+        self.assertEqual(ntp.statfiles.iso_to_posix(
+            ntp.statfiles.posix_to_iso(1480999786)), 1480999786)
 
     def test_posix_to_iso_inverts_iso_to_posix(self):
-        self.assertEqual(ntp.statfiles.posix_to_iso(ntp.statfiles.iso_to_posix("2016-12-06T04:49:46")), "2016-12-06T04:49:46")
+        self.assertEqual(ntp.statfiles.posix_to_iso(
+            ntp.statfiles.iso_to_posix("2016-12-06T04:49:46")),
+            "2016-12-06T04:49:46")
 
 if __name__ == '__main__':
     unittest.main()


=====================================
tests/pylib/test_util.py
=====================================
--- a/tests/pylib/test_util.py
+++ b/tests/pylib/test_util.py
@@ -1,17 +1,25 @@
 import unittest
 import ntp.util
 
+
 class TestPylibUtilMethods(unittest.TestCase):
 
     def test_rfc3339(self):
-        self.assertEqual(ntp.util.rfc3339(1480999786), '2016-12-06T04:49:46Z')
-        self.assertEqual(ntp.util.rfc3339(1480999786.5), '2016-12-06T04:49:46.5Z')
-        self.assertEqual(ntp.util.rfc3339(1480999786.025), '2016-12-06T04:49:46.025Z')
+        self.assertEqual(ntp.util.rfc3339(1480999786),
+                         '2016-12-06T04:49:46Z')
+        self.assertEqual(ntp.util.rfc3339(1480999786.5),
+                         '2016-12-06T04:49:46.5Z')
+        self.assertEqual(ntp.util.rfc3339(1480999786.025),
+                         '2016-12-06T04:49:46.025Z')
 
     def test_portsplit(self):
-        self.assertEqual(ntp.util.portsplit("host.invalid"), ("host.invalid", ""))
-        self.assertEqual(ntp.util.portsplit("host.invalid:123"), ("host.invalid", ":123"))
-        self.assertEqual(ntp.util.portsplit("[0000:1111:2222:3333:4444:5555:6666:7777]:123"), ("0000:1111:2222:3333:4444:5555:6666:7777", ":123"))
+        self.assertEqual(ntp.util.portsplit("host.invalid"),
+                         ("host.invalid", ""))
+        self.assertEqual(ntp.util.portsplit("host.invalid:123"),
+                         ("host.invalid", ":123"))
+        self.assertEqual(ntp.util.portsplit(
+            "[0000:1111:2222:3333:4444:5555:6666:7777]:123"),
+            ("0000:1111:2222:3333:4444:5555:6666:7777", ":123"))
 
 if __name__ == '__main__':
     unittest.main()



View it on GitLab: https://gitlab.com/NTPsec/ntpsec/compare/321f39aca4151896678200fae1e4f6ff97c2590a...6303348b04c5d5689400fab7f6fd55e9962ca7bb
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.ntpsec.org/pipermail/vc/attachments/20170104/de4dd2a6/attachment.html>


More information about the vc mailing list