def test_is_valid_rnd(self): invalids = (random.randint(0, 999999999), random.randint(10000000000, 999999999999), random.randint(10000000000000, 9999999999999999)) for x in invalids: self.assertFalse(is_valid(x), x)
def test_is_valid(self): self.assertTrue(is_valid(1234567891)) self.assertTrue(is_valid(1000000000)) self.assertFalse(is_valid(999999999)) self.assertFalse(is_valid(0)) self.assertFalse(is_valid(1.0000000000))