Esempio n. 1
0
def test_parse_no_worktree(tmpdir):
    ret = parse(str(tmpdir))
    assert ret is None
Esempio n. 2
0
 def parse(root, config):
     try:
         return parse_pkginfo(root, config)
     except OSError:
         return git.parse(root, config=config) or hg.parse(root,
                                                           config=config)
def test_parse_no_worktree(tmpdir):
    ret = parse(str(tmpdir))
    assert ret is None
Esempio n. 4
0
def test_hg_gone(wd, monkeypatch):
    monkeypatch.setenv("PATH", str(wd.cwd / "not-existing"))
    with pytest.raises(EnvironmentError, match="'hg' was not found"):
        parse(str(wd.cwd))