Exemplo n.º 1
0
 def test_convert_with_null_input_when_not_nullable(self):
     arg = Argument('foo', nullable=False)
     self.assertRaises(ValueError, lambda: arg.convert(None, None))
Exemplo n.º 2
0
 def test_convert_default_type_with_null_input(self):
     arg = Argument('foo')
     assert arg.convert(None, None) is None
Exemplo n.º 3
0
 def test_convert_default_type_with_null_input(self):
     arg = Argument('foo')
     self.assertEqual(arg.convert(None, None), None)
Exemplo n.º 4
0
 def test_convert_default_type_with_null_input(self):
     arg = Argument('foo')
     assert arg.convert(None, None) is None