def test_get_repos(tmpdir):
    """
    Get all folders in given path that aren't hidden as KgmRepo instances.
    """
    tmpdir.mkdir("myrepo")
    tmpdir.join("my.txt")
    tmpdir.mkdir(".hidden")
    repos = git_utils.get_repos(str(tmpdir.realpath()))
    assert len(repos) == 1
    assert isinstance(repos[0], git_utils.KgmRepo)
    assert "myrepo" in [a.name for a in repos]
def test_get_repos(tmpdir):
    """
    Get all folders in given path that aren't hidden as KgmRepo instances.
    """
    tmpdir.mkdir("myrepo")
    tmpdir.join("my.txt")
    tmpdir.mkdir(".hidden")
    repos = git_utils.get_repos(str(tmpdir.realpath()))
    assert len(repos) == 1
    assert isinstance(repos[0], git_utils.KgmRepo)
    assert "myrepo" in [a.name for a in repos]
def test_no_repos(tmpdir):
    repos = git_utils.get_repos(str(tmpdir.realpath()))
    assert len(repos) == 0
def test_no_repos(tmpdir):
    repos = git_utils.get_repos(str(tmpdir.realpath()))
    assert len(repos) == 0