def test_payment_validation():
# Copilot automatically suggests:
payment = Payment(amount=-100)
with pytest.raises(ValidationError):
payment.process()
# Before (multiple similar test methods)
def test_user_login_email():
# test code
def test_user_login_username():
# similar test code
# Cursor suggests parametrized tests:
@pytest.mark.parametrize("login_type", ["email", "username"])
def test_user_login(login_type):
# consolidated test code