pytest skip 1

pytest skip

import pytest
@pytest.mark.skip
def test_greater_equal():
   num = 100
   assert num >= 100

Here is what the above code is Doing:
1. We import the pytest module.
2. We create a test function that checks if a number is greater than or equal to 100.
3. We use the assert keyword to check if the number is greater than or equal to 100.
4. We use the @pytest.mark.skip decorator to skip the test.
5. We run the test and see that it is skipped.

Similar Posts