diff options
| author | Mike Frysinger <vapier@google.com> | 2026-10-23 17:13:59 -0400 |
|---|---|---|
| committer | gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2026-10-23 17:00:18 -0700 |
| commit | f4ce9572d1f9e412a5685297d2806ce410e4d4a0 (patch) | |
| tree | cb85b68a49a5ce84832ee771230b3f9be5c3434b /tests/test_git_status.py | |
| parent | cc1f41d782b39d852dbd9c738ff01eb8814d9e86 (diff) | |
| download | git-repo-main.tar.gz git-repo-main.zip | |
Align with Google style guides and `import git_command` as a module
rather than import symbols out of it.
Change-Id: If80d95203e240dd6591e465ef75500c72401d2bf
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/648503
Commit-Queue: Mike Frysinger <vapier@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Tested-by: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'tests/test_git_status.py')
| -rw-r--r-- | tests/test_git_status.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/tests/test_git_status.py b/tests/test_git_status.py index 72698db26..352735f2e 100644 --- a/tests/test_git_status.py +++ b/tests/test_git_status.py @@ -20,6 +20,7 @@ from unittest import mock import pytest +import git_command import git_status @@ -143,8 +144,8 @@ def test_get_status_uses_versioned_machine_options( def Wait(self) -> int: return 0 - monkeypatch.setattr(git_status, "GitCommand", FakeGitCommand) - monkeypatch.setattr(git_status, "git_require", lambda _version: True) + monkeypatch.setattr(git_command, "GitCommand", FakeGitCommand) + monkeypatch.setattr(git_command, "git_require", lambda _version: True) git_status.GetStatus( mock.sentinel.project, @@ -173,7 +174,7 @@ def test_get_status_uses_versioned_machine_options( def test_get_status_rejects_git_before_2_11( monkeypatch: pytest.MonkeyPatch, ) -> None: - monkeypatch.setattr(git_status, "git_require", lambda _version: False) + monkeypatch.setattr(git_command, "git_require", lambda _version: False) with pytest.raises(git_status.UnsupportedStatusError): git_status.GetStatus(mock.sentinel.project, mock.sentinel.gitdir) @@ -194,9 +195,9 @@ def test_get_status_omits_stash_header_before_2_35( def Wait(self) -> int: return 0 - monkeypatch.setattr(git_status, "GitCommand", FakeGitCommand) + monkeypatch.setattr(git_command, "GitCommand", FakeGitCommand) monkeypatch.setattr( - git_status, + git_command, "git_require", lambda version: version <= (2, 34, 0), ) |
