Question 28
Consider the following function to be tested and test functions given in the Python code snippet below.
test_file.py
import pytest
def square(x): sum = 0 for counter in range(x): sum += x return sum
@pytest.mark.marker1def testcase_1(): assert square(10) == 100
@pytest.mark.marker2def testcase_2(): assert square(4) == 4
@pytest.mark.marker3def testcase_3(): assert square(5) == 25@pytest.mark.marker4def testcase_4(): assert square(6) == 6On running this file on the terminal using pytest, the summary of the output is;
========= 1 passed, 3 deselected, 4 warnings in 0.04s =========What command will result into the outcome given above?