PyTest - Writing Assertions
What will be the result of this pytest assertion?
def test_numbers():
x = 10
y = 5 + 5
assert x == ydef test_numbers():
x = 10
y = 5 + 5
assert x == yx is 10, and y is calculated as 5 + 5, which equals 10.assert x == y checks if 10 equals 10, which is true, so the test passes.15+ quiz questions · All difficulty levels · Free
Free Signup - Practice All Questions