summaryrefslogtreecommitdiffstats
path: root/test/test_common.py
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@flameeyes.eu>2017-12-28 13:23:54 +0100
committerDiego Elio Pettenò <flameeyes@flameeyes.eu>2017-12-28 14:12:36 +0100
commit21723b0d0b97a71aad8aafeb5d413015b2909320 (patch)
treef74b2129366fed432db9438cfd19f8e8fda2716e /test/test_common.py
parentUse Python3 Enum class for measurement methods. (diff)
downloadglucometerutils-21723b0d0b97a71aad8aafeb5d413015b2909320.tar
glucometerutils-21723b0d0b97a71aad8aafeb5d413015b2909320.tar.gz
glucometerutils-21723b0d0b97a71aad8aafeb5d413015b2909320.tar.bz2
glucometerutils-21723b0d0b97a71aad8aafeb5d413015b2909320.tar.lz
glucometerutils-21723b0d0b97a71aad8aafeb5d413015b2909320.tar.xz
glucometerutils-21723b0d0b97a71aad8aafeb5d413015b2909320.tar.zst
glucometerutils-21723b0d0b97a71aad8aafeb5d413015b2909320.zip
Diffstat (limited to 'test/test_common.py')
-rw-r--r--test/test_common.py12
1 files changed, 2 insertions, 10 deletions
diff --git a/test/test_common.py b/test/test_common.py
index febf578..8ca50e1 100644
--- a/test/test_common.py
+++ b/test/test_common.py
@@ -22,18 +22,10 @@ class TestCommon(unittest.TestCase):
100, common.Unit.MG_DL, common.Unit.MMOL_L))
self.assertEqual(
- 5.56, common.convert_glucose_unit(
- 100, common.Unit.MG_DL))
-
- self.assertEqual(
180, common.convert_glucose_unit(
10, common.Unit.MMOL_L, common.Unit.MG_DL))
self.assertEqual(
- 180, common.convert_glucose_unit(
- 10, common.Unit.MMOL_L))
-
- self.assertEqual(
100, common.convert_glucose_unit(
100, common.Unit.MG_DL, common.Unit.MG_DL))
@@ -42,8 +34,8 @@ class TestCommon(unittest.TestCase):
10, common.Unit.MMOL_L, common.Unit.MMOL_L))
self.assertRaises(
- exceptions.InvalidGlucoseUnit,
- common.convert_glucose_unit, common.Unit.MMOL_L, 'foo')
+ ValueError,
+ common.convert_glucose_unit, 10, common.Unit.MMOL_L, 'foo')
if __name__ == '__main__':
unittest.main()