def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): loop_results = [] for x in [element * 0.1 for element in range(0, 10)]: loop_results.append(catmath.cat_years_to_hooman_years(x) < 5) if sum(loop_results) == len(loop_results): assert True else: assert False
def test__cat_years_to_hooman_years__middle_age__succeeds(): loop_results = [] for x in range(6, 100, 1): loop_results.append(catmath.cat_years_to_hooman_years(x) >= 30) if sum(loop_results) == len(loop_results): assert True else: assert False
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): cat_age = 0.1 hooman_age = catmath.cat_years_to_hooman_years(cat_age) assert hooman_age == 0.5
def test_cat_to_hooman(hooman_age, cat_age): assert catmath.cat_years_to_hooman_years(hooman_age) == cat_age
def test__is_cat_leap_year__succeeds(): assert catmath.cat_years_to_hooman_years(0) == 0
def test__cat_years_to_hooman_years__0__returns_0(): hooman_age = catmath.cat_years_to_hooman_years(0) assert hooman_age == 0
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): age = 0.5 assert catmath.cat_years_to_hooman_years(age) == CY * age
def test__cat_years_to_hooman_years__NaN__fails(): with pytest.raises(TypeError): catmath.cat_years_to_hooman_years(None)
def test__cat_years_to_hooman_years__middle_age__succeeds(): hooman_age = catmath.cat_years_to_hooman_years(8) assert hooman_age == (8 * 5)
def test__cat_years_to_hooman_years__middle_age__succeeds(age, expected): assert catmath.cat_years_to_hooman_years(age) == expected
def test__cat_years_to_hooman_years__middle_age__succeeds(): age = 50 assert catmath.cat_years_to_hooman_years(age) == CY * age
def test__cat_years_to_hooman_years__middle_age__succeeds(): cat_age = random.randint(1, 20) human_age = catmath.cat_years_to_hooman_years(cat_age) assert human_age == cat_age*catmath.NUM_HOOMAN_YEARS_IN_CAT_YEAR
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): cat_age = random.randint(1, 9)/10 human_age = catmath.cat_years_to_hooman_years(cat_age) assert human_age == cat_age*catmath.NUM_HOOMAN_YEARS_IN_CAT_YEAR
def test__cat_years_to_hooman_years__partial_year__succeeds(): assert catmath.cat_years_to_hooman_years(2.5) == 12.5
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): hooman_age = catmath.cat_years_to_hooman_years(0.3) assert hooman_age == (0.3 * 5)
def test__cat_years_to_hooman_years__0__returns_0(): if catmath.cat_years_to_hooman_years(0) == 0: assert True else: assert False
def test__cat_years_to_hooman_years__middle_age__succeeds(): assert catmath.cat_years_to_hooman_years(10) == 50
def test__cat_years_to_hooman_years__0__returns_0(): cat_age = 0 age = catmath.cat_years_to_hooman_years(cat_age) assert age == 0
def test__cat_years_to_hooman_years__negative_year__succeeds(): assert catmath.cat_years_to_hooman_years(-1) == -5
def test__cat_years_to_hooman_years__middle_age__succeeds(age_cat, age_human): human_years = catmath.cat_years_to_hooman_years(age_cat) assert human_years == age_human
def test__cat_years_to_hooman_years__0__returns_0(): cat_age = 0 assert catmath.cat_years_to_hooman_years(cat_age) == 0
def test__cat_years_to_hooman_years__middle_age__succeeds(): assert cat_years_to_hooman_years(3) == 15
def test__cat_years_to_hooman_years__middle_age__succeeds(): cat_age = 5 assert catmath.cat_years_to_hooman_years(cat_age) == 25
def test__cat_years_to_hooman_years__middle_age__succeeds(): hooman_years = catmath.cat_years_to_hooman_years(5) assert hooman_years == 25
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): cat_age = .5 assert catmath.cat_years_to_hooman_years(cat_age) == 2.5
def test__cat_years_to_hooman_years__middle_age__succeeds(): cat_age = 7 hooman_age = catmath.cat_years_to_hooman_years(cat_age) assert hooman_age == 35
def test__cat_years_to_hooman_years__0__returns_0(): assert catmath.cat_years_to_hooman_years(0) == 0 assert catmath.cat_years_to_hooman_years(0.0) == 0.0
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): hooman_years = catmath.cat_years_to_hooman_years(0.5) assert hooman_years == 2.5
def test__cat_years_to_hooman(age, expected): assert catmath.cat_years_to_hooman_years(age) == expected
def test__cat_years_to_hooman_years__middle_age__succeeds(): cat_age = 8 hooman_age = catmath.cat_years_to_hooman_years(cat_age) assert hooman_age == cat_age * catmath.NUM_HOOMAN_YEARS_IN_CAT_YEAR
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): cat_age = 0.1 hooman_age = catmath.cat_years_to_hooman_years(cat_age) assert hooman_age == cat_age * catmath.NUM_HOOMAN_YEARS_IN_CAT_YEAR
def test__cat_years_to_hooman_years__less_than_one_year__succeeds( age, expected ): assert catmath.cat_years_to_hooman_years(age) == expected
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): cat_age = random.randint(1, 9) / 10 human_age = catmath.cat_years_to_hooman_years(cat_age) assert human_age == cat_age * catmath.NUM_HOOMAN_YEARS_IN_CAT_YEAR
def test__cat_years_to_hooman_years__0__returns_0(): assert catmath.cat_years_to_hooman_years(0) == 0
def test__cat_years_to_hooman_years__middle_age__succeeds(): cat_age = random.randint(1, 20) human_age = catmath.cat_years_to_hooman_years(cat_age) assert human_age == cat_age * catmath.NUM_HOOMAN_YEARS_IN_CAT_YEAR
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): assert catmath.cat_years_to_hooman_years(.5) == 2.5
def test__cat_years_to_hooman_years__0__returns_0(self): self.assertEqual(catmath.cat_years_to_hooman_years(0), 0)
def test__cat_years_to_hooman_years__0__returns_0(): age = 0 assert catmath.cat_years_to_hooman_years(age) == 0
def test__cat_years_to_hooman_years__middle_age__succeeds(self): self.assertEqual(catmath.cat_years_to_hooman_years(8), 40)
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): if catmath.cat_years_to_hooman_years(0.1) < 1: assert True else: assert False
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(self): self.assertEqual(catmath.cat_years_to_hooman_years(.5), 2.5)
def test__cat_years_to_hooman_years__middle_age__succeeds(): if catmath.cat_years_to_hooman_years(7) == 35: assert True else: assert False
def test__cat_years_to_hooman_years__less_than_one_year__succeeds(): cat_years = 0.5 human_years = catmath.cat_years_to_hooman_years(cat_years) assert human_years == 2.5