summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/test_types.py15
1 files changed, 15 insertions, 0 deletions
diff --git a/tests/test_types.py b/tests/test_types.py
index 907be20..7aff73f 100644
--- a/tests/test_types.py
+++ b/tests/test_types.py
@@ -20,6 +20,9 @@ class testTypes(unittest.TestCase):
s = checker.load("Hello World!")
self.assertEqual(s, "Hello World!")
+ s = checker.load(None)
+ self.assertEqual(s, None)
+
def test_text(self):
checker = types.LesanaText()
@@ -29,6 +32,9 @@ class testTypes(unittest.TestCase):
s = checker.load("Hello World!")
self.assertEqual(s, "Hello World!")
+ s = checker.load(None)
+ self.assertEqual(s, None)
+
def test_int(self):
checker = types.LesanaInt()
@@ -45,6 +51,9 @@ class testTypes(unittest.TestCase):
with self.assertRaises(types.LesanaValueError):
checker.load(d)
+ v = checker.load(None)
+ self.assertEqual(v, None)
+
def test_float(self):
checker = types.LesanaFloat()
@@ -64,6 +73,9 @@ class testTypes(unittest.TestCase):
with self.assertRaises(types.LesanaValueError):
checker.load(d)
+ v = checker.load(None)
+ self.assertEqual(v, None)
+
def test_decimal(self):
checker = types.LesanaDecimal()
@@ -83,6 +95,9 @@ class testTypes(unittest.TestCase):
with self.assertRaises(types.LesanaValueError):
checker.load(d)
+ v = checker.load(None)
+ self.assertEqual(v, None)
+
if __name__ == '__main__':
unittest.main()