def test_asdf_missing(self, asdf): with pytest.raises(plugin.AsdfMissing): plugin.asdf_get_installed('3.6')
def test_return_none_if_no_python(self, asdf): assert plugin.asdf_get_installed('3.6') is None
def test_rely_on_best_version(self, asdf, mocker): best_version = mocker.patch.object(plugin, 'best_version', return_value='result') assert plugin.asdf_get_installed('3.6') == 'result' best_version.assert_called_once_with('3.6', mocker.ANY)
def test_return_pypy3_python_binary_path(self, asdf): assert plugin.asdf_get_installed('pypy3.5') == 'pypy3.5-6.0.0'
def test_return_python_binary_path(self, asdf): assert plugin.asdf_get_installed('3.6') == '3.6.0'
def test_unknown_error(self, asdf): with pytest.raises(plugin.AsdfError): plugin.asdf_get_installed('3.6')