예제 #1
0
 def test_false_is_boolean(self):
     self.assertTrue(lib.is_boolean("false"))
     self.assertTrue(lib.is_boolean("fAlse"))
     self.assertTrue(lib.is_boolean("off"))
     self.assertTrue(lib.is_boolean("oFf"))
     self.assertTrue(lib.is_boolean("no"))
     self.assertTrue(lib.is_boolean("nO"))
     self.assertTrue(lib.is_boolean("n"))
     self.assertTrue(lib.is_boolean("N"))
     self.assertTrue(lib.is_boolean("0"))
예제 #2
0
 def test_true_is_boolean(self):
     self.assertTrue(lib.is_boolean("true"))
     self.assertTrue(lib.is_boolean("tRue"))
     self.assertTrue(lib.is_boolean("on"))
     self.assertTrue(lib.is_boolean("ON"))
     self.assertTrue(lib.is_boolean("yes"))
     self.assertTrue(lib.is_boolean("yeS"))
     self.assertTrue(lib.is_boolean("y"))
     self.assertTrue(lib.is_boolean("Y"))
     self.assertTrue(lib.is_boolean("1"))
예제 #3
0
 def test_false_is_boolean(self):
     self.assertTrue(lib.is_boolean("false"))
     self.assertTrue(lib.is_boolean("fAlse"))
     self.assertTrue(lib.is_boolean("off"))
     self.assertTrue(lib.is_boolean("oFf"))
     self.assertTrue(lib.is_boolean("no"))
     self.assertTrue(lib.is_boolean("nO"))
     self.assertTrue(lib.is_boolean("n"))
     self.assertTrue(lib.is_boolean("N"))
     self.assertTrue(lib.is_boolean("0"))
예제 #4
0
 def test_true_is_boolean(self):
     self.assertTrue(lib.is_boolean("true"))
     self.assertTrue(lib.is_boolean("tRue"))
     self.assertTrue(lib.is_boolean("on"))
     self.assertTrue(lib.is_boolean("ON"))
     self.assertTrue(lib.is_boolean("yes"))
     self.assertTrue(lib.is_boolean("yeS"))
     self.assertTrue(lib.is_boolean("y"))
     self.assertTrue(lib.is_boolean("Y"))
     self.assertTrue(lib.is_boolean("1"))
예제 #5
0
 def test_nonboolean_is_not_boolean(self):
     self.assertFalse(lib.is_boolean(""))
     self.assertFalse(lib.is_boolean("a"))
     self.assertFalse(lib.is_boolean("2"))
     self.assertFalse(lib.is_boolean("10"))
     self.assertFalse(lib.is_boolean("yes please"))
     self.assertFalse(lib.is_boolean(" y"))
     self.assertFalse(lib.is_boolean("n "))
     self.assertFalse(lib.is_boolean("NO!"))
예제 #6
0
 def test_nonboolean_is_not_boolean(self):
     self.assertFalse(lib.is_boolean(""))
     self.assertFalse(lib.is_boolean("a"))
     self.assertFalse(lib.is_boolean("2"))
     self.assertFalse(lib.is_boolean("10"))
     self.assertFalse(lib.is_boolean("yes please"))
     self.assertFalse(lib.is_boolean(" y"))
     self.assertFalse(lib.is_boolean("n "))
     self.assertFalse(lib.is_boolean("NO!"))