Skip to content

Commit

Permalink
REMOVE ME!
Browse files Browse the repository at this point in the history
  • Loading branch information
miri64 committed Jul 8, 2021
1 parent 69488cc commit 50bffed
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion testutils/github.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
GIST_ID_COMMENT_PATTERN = GIST_ID_COMMENT_FMT.format(
gist_id="(?P<gist_id>[0-9a-f]+)"
)
GIT_QUIET = True
GIT_QUIET = False
GITHUB_DOMAIN = "github.com"
API_URL = "https://api.%s" % GITHUB_DOMAIN
REPO_NAME = "RIOT-OS/Release-Specs"
Expand Down
14 changes: 7 additions & 7 deletions testutils/tests/test_git.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,15 +10,15 @@

@pytest.fixture
def bare_repo(tmp_path):
git = testutils.git.Git(tmp_path / 'upstream')
git = testutils.git.Git(tmp_path / 'upstream', quiet=False)
git.repodir.mkdir()
git.cmd('init', '--bare')
yield git


@pytest.fixture
def repo_wo_remote(tmp_path):
git = testutils.git.Git(tmp_path / 'the_repo')
git = testutils.git.Git(tmp_path / 'the_repo', quiet=False)
git.repodir.mkdir()
git.cmd('init')
yield git
Expand All @@ -36,7 +36,7 @@ def test_exists(tmp_path):

def test_repodir(tmp_path):
repo_dir = tmp_path / 'the_repo'
git = testutils.git.Git(repo_dir)
git = testutils.git.Git(repo_dir, quiet=False)
assert git.repodir == repo_dir


Expand Down Expand Up @@ -65,7 +65,7 @@ def mock_check_output(cmd, *args, stderr=None, **kwargs):


def test_cmd_error(monkeypatch, tmp_path):
git = testutils.git.Git(tmp_path)
git = testutils.git.Git(tmp_path, quiet=False)

def mock_check_output(cmd, *args, stderr=None, **kwargs):
# pylint: disable=unused-argument
Expand All @@ -81,7 +81,7 @@ def mock_check_output(cmd, *args, stderr=None, **kwargs):

def test_clone(bare_repo, tmp_path):
repo_dir = tmp_path / 'the_repo'
git = testutils.git.Git.clone(bare_repo.repodir, repo_dir)
git = testutils.git.Git.clone(bare_repo.repodir, repo_dir, quiet=False)
assert (git.repodir / '.git').exists()


Expand Down Expand Up @@ -136,15 +136,15 @@ def test_log(repo_wo_remote):

def test_push(bare_repo, tmp_path):
repo_dir = tmp_path / 'the_repo'
git = testutils.git.Git.clone(bare_repo.repodir, repo_dir)
git = testutils.git.Git.clone(bare_repo.repodir, repo_dir, quiet=False)
test_log(git)
git.push()
assert git.log() == bare_repo.log()


def test_pull(bare_repo, tmp_path):
repo_dir2 = tmp_path / 'the_repo_new'
git = testutils.git.Git.clone(bare_repo.repodir, repo_dir2)
git = testutils.git.Git.clone(bare_repo.repodir, repo_dir2, quiet=False)
test_push(bare_repo, tmp_path)
with pytest.raises(testutils.git.GitError):
# no commits, so git log will fail
Expand Down

0 comments on commit 50bffed

Please sign in to comment.