diff options
author | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-11-16 00:52:39 +0100 |
---|---|---|
committer | Diego Elio Pettenò <flameeyes@flameeyes.eu> | 2018-11-16 00:52:39 +0100 |
commit | d7265e672035c29b486929caf49d5a9246421d8a (patch) | |
tree | 9a6102ce1ee7389dcdd2ccb2a16aff819c8b4ea4 /test/test_construct_extras.py | |
parent | otultraeasy: factor out the packet creation, and add tests. (diff) | |
download | glucometerutils-d7265e672035c29b486929caf49d5a9246421d8a.tar glucometerutils-d7265e672035c29b486929caf49d5a9246421d8a.tar.gz glucometerutils-d7265e672035c29b486929caf49d5a9246421d8a.tar.bz2 glucometerutils-d7265e672035c29b486929caf49d5a9246421d8a.tar.lz glucometerutils-d7265e672035c29b486929caf49d5a9246421d8a.tar.xz glucometerutils-d7265e672035c29b486929caf49d5a9246421d8a.tar.zst glucometerutils-d7265e672035c29b486929caf49d5a9246421d8a.zip |
Diffstat (limited to '')
-rw-r--r-- | test/test_construct_extras.py | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/test/test_construct_extras.py b/test/test_construct_extras.py index b0cd1c3..65bc047 100644 --- a/test/test_construct_extras.py +++ b/test/test_construct_extras.py @@ -6,15 +6,13 @@ __email__ = 'flameeyes@flameeyes.eu' __copyright__ = 'Copyright © 2018, Diego Elio Pettenò' __license__ = 'MIT' +# pylint: disable=protected-access,missing-docstring + import datetime -import os -import sys -import unittest +from absl.testing import absltest import construct -sys.path.append(os.path.dirname(os.path.dirname(os.path.abspath(__file__)))) - from glucometerutils.support import construct_extras @@ -24,7 +22,7 @@ _TEST_DATE3 = datetime.datetime(1970, 1, 1, 0, 0) _NEW_EPOCH = 31536000 # datetime.datetime(1971, 1, 1, 0, 0) -class TestTimestamp(unittest.TestCase): +class TestTimestamp(absltest.TestCase): def test_build_unix_epoch(self): self.assertEqual( @@ -69,7 +67,3 @@ class TestTimestamp(unittest.TestCase): def test_invalid_value(self): with self.assertRaises(AssertionError): construct_extras.Timestamp(construct.Int32ul).build('foo') - - -if __name__ == '__main__': - unittest.main() |