We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 7555483 commit 5c31577Copy full SHA for 5c31577
test/framework/type_checking.py
@@ -451,6 +451,12 @@ def test_is_value_of_type(self):
451
self.assertFalse(is_value_of_type(1, str))
452
self.assertFalse(is_value_of_type("foo", int))
453
454
+ # checking for None
455
+ self.assertFalse(is_value_of_type(1, type(None)))
456
+ self.assertFalse(is_value_of_type('a', type(None)))
457
+ self.assertTrue(is_value_of_type(None, type(None)))
458
+ self.assertFalse(is_value_of_type(('a', 'b'), type(None)))
459
+
460
# list of strings check
461
self.assertTrue(is_value_of_type([], LIST_OF_STRINGS))
462
self.assertTrue(is_value_of_type(['foo', 'bar'], LIST_OF_STRINGS))
0 commit comments