@patch('os.path.exists')
def test_resolve_interpreter_with_nonexistent_interpreter(mock_exists):
 mock_exists.return_value = False
 with pytest.raises(SystemExit):
  virtualenv.resolve_interpreter('/usr/bin/python53')
 mock_exists.assert_called_with('/usr/bin/python53')

@ patch ( 'os.path.exists' ) def test_resolve_interpreter_with_nonexistent_interpreter ( mock_exists ) : mock_exists . return_value = False with pytest . raises ( SystemExit ) : virtualenv . resolve_interpreter ( '/usr/bin/python53' ) mock_exists . assert_called_with ( '/usr/bin/python53' )
should systemexit with an nonexistent python interpreter path .