Example #1
0
    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)
Example #2
0
File: test_api.py Project: nta/gdm
    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)
Example #3
0
File: test_api.py Project: nta/gdm
    def it_should_not_fail_when_no_dependnecies_exist(config):
        assert not os.path.isdir(config.location)

        assert gdm.uninstall()