summaryrefslogtreecommitdiffstats
path: root/tests/test_git_command.py
diff options
context:
space:
mode:
authorMike Frysinger <vapier@google.com>2025-03-25 12:50:36 -0400
committerLUCI <gerrit-scoped@luci-project-accounts.iam.gserviceaccount.com>2025-03-25 11:19:49 -0700
commit8310436be083f8268bf8325bb2ffb65e9e178f6f (patch)
tree1aa0a97aee95407b7bdcca89df0fc57361900b36 /tests/test_git_command.py
parentd5087392edcee3c0da4ba19efb6005efd9ccf706 (diff)
downloadgit-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.py4
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
21import unittest 21import unittest
22from unittest import mock 22from unittest import mock
23 23
24import pytest
25
24import git_command 26import git_command
25import wrapper 27import 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