@pytest.mark.network
def test_search_exit_status_code_when_finds_no_package(script):
 result = script.pip('search', 'nonexistentpackage', expect_error=True)
 assert (result.returncode == NO_MATCHES_FOUND), result.returncode

@ pytest . mark . network def test_search_exit_status_code_when_finds_no_package ( script ) : result = script . pip ( 'search' , 'nonexistentpackage' , expect_error = True ) assert ( result . returncode == NO_MATCHES_FOUND ) , result . returncode
test search exit status code for no matches .