From 4876167249d20de00fd4125fec1030bb17b52649 Mon Sep 17 00:00:00 2001 From: glados-verma Date: Fri, 28 Jun 2024 17:00:01 -0700 Subject: [PATCH] Fix test breakage likely caused by an update to pytest. PiperOrigin-RevId: 647833892 --- openhtf/util/test.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openhtf/util/test.py b/openhtf/util/test.py index 54cabb7b..2c794011 100644 --- a/openhtf/util/test.py +++ b/openhtf/util/test.py @@ -660,10 +660,11 @@ class TestCase(unittest.TestCase): def __init__(self, methodName=None): super(TestCase, self).__init__(methodName=methodName) - test_method = getattr(self, methodName) - if inspect.isgeneratorfunction(test_method): - raise ValueError('%s yields without @openhtf.util.test.yields_phases' % - methodName) + if methodName != 'runTest': + test_method = getattr(self, methodName) + if inspect.isgeneratorfunction(test_method): + raise ValueError('%s yields without @openhtf.util.test.yields_phases' % + methodName) def setUp(self): super(TestCase, self).setUp()