def test_get_number_of_rolls_of_wallpaper(self): actual_res = self.house.get_roof_square() expected_res = 60 assert actual_res == expected_res house_with_other_roof = House() house_with_other_roof.create_roof(10, 6, "gable") actual_res = house_with_other_roof.get_roof_square() expected_res = 120 assert actual_res == expected_res
def setup_class(cls): cls.house = House() cls.house.create_wall(10, 2.5) cls.house.create_wall(10, 2.5) cls.house.create_wall(14, 2.5) cls.house.create_wall(14, 2.5) cls.house.create_roof(10, 6, "single-pitch") cls.house.create_door(1, 2) cls.house.create_window(3, 1)
def test_zero_wall(self): with pytest.raises(ValueError): zero_house = House() zero_house.create_wall(0, 0)