From 1b777e90aa2111c5ad77282208f89a3a2b9db0ba Mon Sep 17 00:00:00 2001 From: glados-verma Date: Fri, 28 Jun 2024 18:17:33 -0700 Subject: [PATCH 1/2] Fix test breakage likely caused by an update to pytest --- 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 54cabb7b8..2c7940119 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() From f83883331ba84edae5eccc8d72f96a46e5f8ac23 Mon Sep 17 00:00:00 2001 From: glados-verma Date: Fri, 28 Jun 2024 18:18:22 -0700 Subject: [PATCH 2/2] Also generate LCOV file to fix coveralls integration --- tox.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tox.ini b/tox.ini index 691476e0c..d2096d508 100644 --- a/tox.ini +++ b/tox.ini @@ -10,7 +10,7 @@ python = [testenv] deps = -r{toxinidir}/test_reqs.txt commands = {envbindir}/python setup.py build_proto - {envbindir}/python setup.py test --pytest-cov=term-missing + {envbindir}/python setup.py test --pytest-cov=term-missing,lcov # usedevelop causes tox to skip using .tox/dist/openhtf*.zip # Instead, it does 'python setup.py develop' which only adds openhtf/ to the # path.