def test_manage_update_pkg_do_not_change_installed_options(): ver = get_local_version() ver.version = (ver.version[0], ver.version[1] + 1, ver.version[2]) pkg_cfg = {'base': dict(pkg_fullname='toto', pkgname='toto', namespace=None, author_name='moi', author_email='*****@*****.**')} mem = dict(pkg_cfg['base']) with mock.patch("ltpkgbuilder.manage.get_github_version", return_value=ver): with mock.patch('ltpkgbuilder.option_tools.loc_input', return_value=''): pkg_cfg = update_pkg(pkg_cfg) assert len(pkg_cfg) == 1 assert pkg_cfg['base'] == mem
def test_get_local_version_returns_some_version_scheme(): v = get_local_version() assert v >= '0.1.0'