generate test coverage report pytest output code example
Example 1: python run pytest
Just type this in shell:
pytest
Or this if that does nott work:
python -m pytest
Example 2: httpretty pytest fixture
@pytest.yield_fixture
def http_pretty_mock():
httpretty.enable()
yield
httpretty.disable()
def test_write_file_from_datasource_failing(http_pretty_mock, tmpdir):
tmpdir = str(tmpdir)
# mock the connection