def test_commands(self): config = Config(FILES) shutil.rmtree(config.location, ignore_errors=True) assert not os.path.exists(config.location) # install sources assert gdm.install(root=FILES) assert 'gdm_1' in os.listdir(config.location) assert 'gdm_2' in os.listdir(config.location) # list versions assert gdm.list(FILES) # update sources assert gdm.update(root=FILES) assert 'gdm_1' in os.listdir(config.location) assert 'gdm_2' in os.listdir(config.location) # install locked sources assert gdm.install(root=FILES) assert 'gdm_1' in os.listdir(config.location) assert 'gdm_2' in os.listdir(config.location) # uninstall sources assert gdm.uninstall(root=FILES) assert not os.path.isdir(config.location)
def it_should_delete_dependencies_when_they_exist(config): gdm.install('gdm_1', depth=1) assert os.path.isdir(config.location) assert gdm.uninstall() assert not os.path.exists(config.location)
def it_should_not_fail_when_no_dependnecies_exist(config): assert not os.path.isdir(config.location) assert gdm.uninstall()