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