Skip to content

Commit

Permalink
Merge pull request #1163 from google:glados-verma-patch-1
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 647863738
  • Loading branch information
Copybara-Service committed Jun 29, 2024
2 parents 865512a + f838833 commit 71e03cb
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 5 deletions.
9 changes: 5 additions & 4 deletions openhtf/util/test.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion tox.ini
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit 71e03cb

Please sign in to comment.