Beispiel #1
0
 def test_asdf_missing(self, asdf):
     with pytest.raises(plugin.AsdfMissing):
         plugin.asdf_get_installed('3.6')
Beispiel #2
0
 def test_return_none_if_no_python(self, asdf):
     assert plugin.asdf_get_installed('3.6') is None
Beispiel #3
0
 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)
Beispiel #4
0
 def test_return_pypy3_python_binary_path(self, asdf):
     assert plugin.asdf_get_installed('pypy3.5') == 'pypy3.5-6.0.0'
Beispiel #5
0
 def test_return_python_binary_path(self, asdf):
     assert plugin.asdf_get_installed('3.6') == '3.6.0'
Beispiel #6
0
 def test_unknown_error(self, asdf):
     with pytest.raises(plugin.AsdfError):
         plugin.asdf_get_installed('3.6')