Beispiel #1
0
 def test_boolean_with_python_bool(self):
     """Input that is already a native python `bool` should be passed through
     without extra processing."""
     assert_equal(inputs.boolean(True), True)
     assert_equal(inputs.boolean(False), False)
Beispiel #2
0
 def test_bad_boolean(self):
     assert_raises(ValueError, lambda: inputs.boolean("blah"))
Beispiel #3
0
 def test_boolean(self):
     assert_equal(inputs.boolean("FaLSE"), False)
Beispiel #4
0
 def test_boolean_is_true_for_1(self):
     assert_equal(inputs.boolean("1"), True)
Beispiel #5
0
 def test_boolean_true(self):
     assert_equal(inputs.boolean("true"), True)
Beispiel #6
0
 def test_boolean_is_false_for_0(self):
     assert_equal(inputs.boolean("0"), False)
Beispiel #7
0
 def test_boolean_false(self):
     assert_equal(inputs.boolean("False"), False)