def test_is_number_balanced(self): self.assertEqual(is_number_balanced(9), True) self.assertEqual(is_number_balanced(11), True) self.assertEqual(is_number_balanced(13), False) self.assertEqual(is_number_balanced(121), True) self.assertEqual(is_number_balanced(4518), True) self.assertEqual(is_number_balanced(28471), False) self.assertEqual(is_number_balanced(1238033), True)
def test_problem_statement_cases(self): self.assertEqual(True, is_number_balanced(9)) self.assertEqual(True, is_number_balanced(11)) self.assertEqual(False, is_number_balanced(13)) self.assertEqual(True, is_number_balanced(121)) self.assertEqual(True, is_number_balanced(4518)) self.assertEqual(False, is_number_balanced(28471)) self.assertEqual(True, is_number_balanced(1238033))
def test_is_number_balanced(self): self.assertEqual(True, solution.is_number_balanced(9)) self.assertEqual(True, solution.is_number_balanced(11)) self.assertEqual(False, solution.is_number_balanced(13)) self.assertEqual(True, solution.is_number_balanced(121)) self.assertEqual(True, solution.is_number_balanced(4518)) self.assertEqual(False, solution.is_number_balanced(28471)) self.assertEqual(True, solution.is_number_balanced(1238033))
def test_is_number_balanced(self): self.assertTrue(is_number_balanced(9)) self.assertTrue(is_number_balanced(11)) self.assertFalse(is_number_balanced(13)) self.assertTrue(is_number_balanced(121)) self.assertTrue(is_number_balanced(4518)) self.assertFalse(is_number_balanced(28471)) self.assertFalse(is_number_balanced(123803))
def test_is_balanced(self): self.assertEqual(True, solution.is_number_balanced(1238033)) self.assertEqual(True, solution.is_number_balanced(333)) self.assertEqual(False, solution.is_number_balanced(4344)) self.assertEqual(False, solution.is_number_balanced(1234)) self.assertEqual(True, solution.is_number_balanced(1)) self.assertEqual(True, solution.is_number_balanced(0))
def test_is_number_balanced4(self): self.assertEqual(False, solution.is_number_balanced(1231))
def test_121(self): self.assertTrue(is_number_balanced(121))
def test_balanced(self): self.assertTrue(is_number_balanced(9)) self.assertTrue(is_number_balanced(11)) self.assertTrue(is_number_balanced(121)) self.assertTrue(is_number_balanced(4518)) self.assertTrue(is_number_balanced(1238033))
def test_is_number_balanced1(self): self.assertEqual(True, solution.is_number_balanced(10001))
def test_with_single_digit_numbers(self): self.assertTrue(solution.is_number_balanced(0)) self.assertTrue(solution.is_number_balanced(6))
def test_vour(self): self.assertEquals(True, is_number_balanced(121))
def test_true_even_digits(self): self.assertTrue(solution.is_number_balanced(4518))
def test_is_number_balanced_0(self): self.assertEqual(True, is_number_balanced(1238033))
def test_one(self): self.assertEquals(True, is_number_balanced(9))
def test_two(self): self.assertEquals(True, is_number_balanced(11))
def test_seven(self): self.assertEquals(True, is_number_balanced(1238033))
def test_six(self): self.assertEquals(False, is_number_balanced(28471))
def test_five(self): self.assertEquals(True, is_number_balanced(4518))
def test_28471(self): self.assertFalse(is_number_balanced(28471))
def test_true(self): self.assertTrue(solution.is_number_balanced(9))
def test_9(self): self.assertTrue(is_number_balanced(9))
def test_false(self): self.assertFalse(solution.is_number_balanced(13))
def test_with_numbers_with_even_number_of_digits(self): self.assertTrue(solution.is_number_balanced(123402)) self.assertFalse(solution.is_number_balanced(780092))
def test_true_odd_digits(self): self.assertTrue(solution.is_number_balanced(121))
def test_is_number_balanced3(self): self.assertEqual(False, solution.is_number_balanced(4859))
def test_4518(self): self.assertTrue(is_number_balanced(4518))
def test_1(self): self.assertEqual(True, solution.is_number_balanced(9))
def test_not_balanced(self): self.assertFalse(is_number_balanced(13)) self.assertFalse(is_number_balanced(28471))
def test_1238033(self): self.assertTrue(is_number_balanced(1238033))
def test_is_number_balanced5(self): self.assertEqual(True, solution.is_number_balanced(1238033))
def test_13(self): self.assertFalse(is_number_balanced(13))
def test_11(self): self.assertTrue(is_number_balanced(11))
def test_is_number_balanced2(self): self.assertEqual(True, solution.is_number_balanced(14332))
def test_is_number_balanced4(self): self.assertEqual(True, solution.is_number_balanced(2341))
def test_is_number_balanced_2(self): self.assertEqual(False, is_number_balanced(13))
def test_is_number_balanced_1(self): self.assertEqual(True, is_number_balanced(5))
def test_with_numbers_with_odd_number_of_digits(self): self.assertTrue(solution.is_number_balanced(7513193)) self.assertFalse(solution.is_number_balanced(74783404734))
def test_nbalanced(self): self.assertEqual(True,is_number_balanced(9)) self.assertEqual(False,is_number_balanced(13))
def test_6(self): self.assertEqual(False, solution.is_number_balanced(28471))
def test_thee(self): self.assertEquals(False, is_number_balanced(13))
def test_3(self): self.assertEqual(False, solution.is_number_balanced(13))
def test_is_number_balanced(self): self.assertTrue(solution.is_number_balanced(4518)) self.assertTrue(solution.is_number_balanced(1238033)) self.assertFalse(solution.is_number_balanced(28471))
def test_5(self): self.assertEqual(True, solution.is_number_balanced(4518))