def test_path_is_invalid_hg_repo(tmpdir):
    """ when the hgrc does not contain the remote alias, should return false"""
    output = setup_hg_repo(tmpdir.path)
    assert not checkout.path_is_hg_repo(output, checkout.get_alias(
        'https://hg.mozilla.org/mozilla-central'))
def test_path_is_not_hg_repo(tmpdir):
    """ when path is not a mercurial repository, this should return false"""
    assert not checkout.path_is_hg_repo(tmpdir.path, None)
def test_path_is_hg_repo(tmpdir):
    """ should succeed when a path is a valid mercurial repository"""
    output = setup_hg_repo(tmpdir.path)
    assert checkout.path_is_hg_repo(output, checkout.get_alias(TEST_HG_REPO_REMOTE))