Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix test breakage likely caused by an update to pytest #1163

Merged
merged 2 commits into from
Jun 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading