We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 17df7b2 commit 4531c9bCopy full SHA for 4531c9b
1 file changed
test/test_time.py
@@ -1,7 +1,7 @@
1
-import unittest
2
-from unittest.mock import patch
3
import time
+import unittest
4
from datetime import datetime
+from unittest.mock import patch
5
6
import canopen
7
import canopen.timestamp
@@ -16,7 +16,9 @@ def test_time_producer(self):
16
producer = canopen.timestamp.TimeProducer(network)
17
18
# Test that the epoch is correct
19
- epoch = datetime.strptime("1984-01-01 00:00:00 +0000", "%Y-%m-%d %H:%M:%S %z").timestamp()
+ epoch = datetime.strptime(
20
+ "1984-01-01 00:00:00 +0000", "%Y-%m-%d %H:%M:%S %z"
21
+ ).timestamp()
22
self.assertEqual(int(epoch), canopen.timestamp.OFFSET)
23
24
current = time.time()
@@ -45,5 +47,6 @@ def test_time_producer(self):
45
47
46
48
network.disconnect()
49
50
+
51
if __name__ == "__main__":
52
unittest.main()
0 commit comments