def test_min_value_should_reject_comparison_with_wads(self): with pytest.raises(ArithmeticError): Ray.min(Ray(10), Wad(20)) with pytest.raises(ArithmeticError): Ray.min(Wad(25), Ray(15))
def test_min_value_should_reject_comparison_with_ints(self): with pytest.raises(ArithmeticError): Ray.min(Ray(10), 20) with pytest.raises(ArithmeticError): Ray.min(20, Ray(10))
def test_min_value(self): assert Ray.min(Ray(10), Ray(20)) == Ray(10) assert Ray.min(Ray(25), Ray(15)) == Ray(15) assert Ray.min(Ray(25), Ray(15), Ray(5)) == Ray(5)