-
Notifications
You must be signed in to change notification settings - Fork 4
Handle clients-tests requires section #48
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
Changes from 2 commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -568,20 +568,25 @@ def remove_implicit_resolver(cls, tag_to_remove): | |
# Each file may have a "test" named 'setup' or 'teardown', | ||
# these sets of steps should be run at the beginning and end | ||
# of every other test within the file so we do one pass to capture those. | ||
setup_steps = teardown_steps = None | ||
requires = setup_steps = teardown_steps = None | ||
test_numbers_and_steps = [] | ||
test_number = 0 | ||
|
||
for yaml_test in yaml_tests: | ||
test_name, test_step = yaml_test.popitem() | ||
if test_name == "setup": | ||
if test_name == "requires": | ||
requires = test_step | ||
elif test_name == "setup": | ||
setup_steps = test_step | ||
elif test_name == "teardown": | ||
teardown_steps = test_step | ||
else: | ||
test_numbers_and_steps.append((test_number, test_step)) | ||
test_number += 1 | ||
|
||
if not requires["serverless"]: | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Can a test not have a There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. It's not possible. If it happens, I'd rather crash loudly than making a wrong choice (offensive programming vs. defensive programming). After all, we fully control the tests here. |
||
continue | ||
|
||
# Now we combine setup, teardown, and test_steps into | ||
# a set of pytest.param() instances | ||
for test_number, test_step in test_numbers_and_steps: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This comment should also mention the
requires
section.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, addressed in
545a1cc
(#48)