def test_clone_or_update(): path = settings['WORKSPACE'] + '/test_clone' assert not (git.exists(path)), 'Directory should not exist.' git.clone_or_update(config, 'git://github.com/markstory/lint-review.git', path, 'e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0') assert git.exists(path) git.destroy(path)
def test_repo_operations(self): teardown_repo() res = git.clone( 'git://github.com/markstory/lint-review.git', clone_path) assert res, 'Cloned successfully.' assert git.exists(clone_path), 'Cloned dir should be there.' git.destroy(clone_path) assert not(git.exists(clone_path)), 'Cloned dir should be gone.'
def test_repo_operations(): path = settings['WORKSPACE'] + '/test_clone' assert not (git.exists(path)), 'Directory should not exist.' res = git.clone('git://github.com/markstory/lint-review.git', path) assert res, 'Cloned successfully.' assert git.exists(path), 'Cloned dir should be there.' git.destroy(path) assert not (git.exists(path)), 'Cloned dir should be gone.'
def test_clone_or_update(): path = settings["WORKSPACE"] + "/test_clone" assert not (git.exists(path)), "Directory should not exist." git.clone_or_update( config, "git://github.com/markstory/lint-review.git", path, "e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0" ) assert git.exists(path) git.destroy(path)
def test_repo_operations(): path = settings["WORKSPACE"] + "/test_clone" assert not (git.exists(path)), "Directory should not exist." res = git.clone("git://github.com/markstory/lint-review.git", path) assert res, "Cloned successfully." assert git.exists(path), "Cloned dir should be there." git.destroy(path) assert not (git.exists(path)), "Cloned dir should be gone."
def test_clone_or_update(): path = settings['WORKSPACE'] + '/test_clone' assert not(git.exists(path)), 'Directory should not exist.' git.clone_or_update( 'git://github.com/markstory/lint-review.git', path, 'e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0') assert git.exists(path) git.destroy(path)
def test_repo_operations(): path = settings['WORKSPACE'] + '/test_clone' assert not(git.exists(path)), 'Directory should not exist.' res = git.clone( 'git://github.com/markstory/lint-review.git', path) assert res, 'Cloned successfully.' assert git.exists(path), 'Cloned dir should be there.' git.destroy(path) assert not(git.exists(path)), 'Cloned dir should be gone.'
def test_clone_or_update(self, mock_fetch, mock_checkout): teardown_repo() git.clone_or_update( config, 'git://github.com/markstory/lint-review.git', clone_path, 'e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0') assert git.exists(clone_path)
def test_exists__no_git(): assert not git.exists(settings['WORKSPACE'])
def test_exists__no_path(): assert not git.exists(settings['WORKSPACE'] + '/herp/derp')
def teardown_repo(): if git.exists(clone_path): git.destroy(clone_path)
def test_clone_or_update(): git.clone_or_update(config, 'git://github.com/markstory/lint-review.git', clone_path, 'e4f880c77e6b2c81c81cad5d45dd4e1c39b919a0') assert git.exists(clone_path)
def test_exists__no_path(): assert not git.exists(settings["WORKSPACE"] + "/herp/derp")