diff options
| author | Mike Frysinger <vapier@google.com> | 2025-03-25 12:50:36 -0400 |
|---|---|---|
| committer | LUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com> | 2025-03-25 11:19:49 -0700 |
| commit | 8310436be083f8268bf8325bb2ffb65e9e178f6f (patch) | |
| tree | 1aa0a97aee95407b7bdcca89df0fc57361900b36 /tests/test_git_command.py | |
| parent | d5087392edcee3c0da4ba19efb6005efd9ccf706 (diff) | |
| download | git-repo-8310436be083f8268bf8325bb2ffb65e9e178f6f.tar.gz | |
run_tests: move test filtering to pytest markers
Move the test disable logic even closer to the exact test that's
disabled. This way people updating tests have a better chance of
seeing they'll get reduced coverage in the CQ.
Change-Id: I57c1a073a844019798b27e14d742fd32925d9ae8
Reviewed-on: https://gerrit-review.googlesource.com/c/git-repo/+/462882
Tested-by: Mike Frysinger <vapier@google.com>
Reviewed-by: Gavin Mak <gavinmak@google.com>
Commit-Queue: Mike Frysinger <vapier@google.com>
Diffstat (limited to 'tests/test_git_command.py')
| -rw-r--r-- | tests/test_git_command.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/tests/test_git_command.py b/tests/test_git_command.py index ffee023b..16494499 100644 --- a/tests/test_git_command.py +++ b/tests/test_git_command.py | |||
| @@ -21,6 +21,8 @@ import subprocess | |||
| 21 | import unittest | 21 | import unittest |
| 22 | from unittest import mock | 22 | from unittest import mock |
| 23 | 23 | ||
| 24 | import pytest | ||
| 25 | |||
| 24 | import git_command | 26 | import git_command |
| 25 | import wrapper | 27 | import wrapper |
| 26 | 28 | ||
| @@ -263,6 +265,7 @@ class UserAgentUnitTest(unittest.TestCase): | |||
| 263 | m = re.match(r"^[^ ]+$", os_name) | 265 | m = re.match(r"^[^ ]+$", os_name) |
| 264 | self.assertIsNotNone(m) | 266 | self.assertIsNotNone(m) |
| 265 | 267 | ||
| 268 | @pytest.mark.skip_cq("TODO(b/266734831): Find out why this fails in CQ") | ||
| 266 | def test_smoke_repo(self): | 269 | def test_smoke_repo(self): |
| 267 | """Make sure repo UA returns something useful.""" | 270 | """Make sure repo UA returns something useful.""" |
| 268 | ua = git_command.user_agent.repo | 271 | ua = git_command.user_agent.repo |
| @@ -271,6 +274,7 @@ class UserAgentUnitTest(unittest.TestCase): | |||
| 271 | m = re.match(r"^git-repo/[^ ]+ ([^ ]+) git/[^ ]+ Python/[0-9.]+", ua) | 274 | m = re.match(r"^git-repo/[^ ]+ ([^ ]+) git/[^ ]+ Python/[0-9.]+", ua) |
| 272 | self.assertIsNotNone(m) | 275 | self.assertIsNotNone(m) |
| 273 | 276 | ||
| 277 | @pytest.mark.skip_cq("TODO(b/266734831): Find out why this fails in CQ") | ||
| 274 | def test_smoke_git(self): | 278 | def test_smoke_git(self): |
| 275 | """Make sure git UA returns something useful.""" | 279 | """Make sure git UA returns something useful.""" |
| 276 | ua = git_command.user_agent.git | 280 | ua = git_command.user_agent.git |
