x = 0 # Bad assert x > 0, "x should be positive" # Good if x <= 0: raise ValueError("x should be positive")
line 4, in <module> assert x > 0, "x should be positive" ^^^^^ AssertionError: x should be positive