From 8310436be083f8268bf8325bb2ffb65e9e178f6f Mon Sep 17 00:00:00 2001 From: Mike Frysinger Date: Tue, 25 Mar 2025 12:50:36 -0400 Subject: 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 Reviewed-by: Gavin Mak Commit-Queue: Mike Frysinger --- tests/test_git_command.py | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'tests/test_git_command.py') 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 import unittest from unittest import mock +import pytest + import git_command import wrapper @@ -263,6 +265,7 @@ class UserAgentUnitTest(unittest.TestCase): m = re.match(r"^[^ ]+$", os_name) self.assertIsNotNone(m) + @pytest.mark.skip_cq("TODO(b/266734831): Find out why this fails in CQ") def test_smoke_repo(self): """Make sure repo UA returns something useful.""" ua = git_command.user_agent.repo @@ -271,6 +274,7 @@ class UserAgentUnitTest(unittest.TestCase): m = re.match(r"^git-repo/[^ ]+ ([^ ]+) git/[^ ]+ Python/[0-9.]+", ua) self.assertIsNotNone(m) + @pytest.mark.skip_cq("TODO(b/266734831): Find out why this fails in CQ") def test_smoke_git(self): """Make sure git UA returns something useful.""" ua = git_command.user_agent.git -- cgit v1.2.3-54-g00ecf