-
Notifications
You must be signed in to change notification settings - Fork 32
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 python suites #1164
Merged
Merged
Fix python suites #1164
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -145,21 +145,21 @@ def run(self): | |
result = self.run_group_setup(group_class, True) | ||
if result: | ||
results.append(result) | ||
yield result | ||
if ( | ||
result.exceptions and group_class.abort_on_exception | ||
) or result.stopped: | ||
raise StopScript | ||
yield result | ||
if ( | ||
result.exceptions and group_class.abort_on_exception | ||
) or result.stopped: | ||
raise StopScript | ||
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. Lots of bad indentation was breaking running Groups and Suites |
||
|
||
case "GROUP_TEARDOWN": | ||
result = self.run_group_teardown(group_class, True) | ||
if result: | ||
results.append(result) | ||
yield result | ||
if ( | ||
result.exceptions and group_class.abort_on_exception | ||
) or result.stopped: | ||
raise StopScript | ||
yield result | ||
if ( | ||
result.exceptions and group_class.abort_on_exception | ||
) or result.stopped: | ||
raise StopScript | ||
|
||
# Teardown the suite | ||
result = self.run_teardown(True) | ||
|
@@ -330,9 +330,11 @@ def run(self): | |
result = self.run_setup() | ||
if result: | ||
results.append(result) | ||
yield result | ||
if (results[-1].exceptions and Group.abort_on_exception) or results[-1].stopped: | ||
raise StopScript | ||
yield result | ||
if (results[-1].exceptions and Group.abort_on_exception) or results[ | ||
-1 | ||
].stopped: | ||
raise StopScript | ||
|
||
# Run all the scripts | ||
for method_name in self.__class__.scripts(): | ||
|
@@ -347,9 +349,11 @@ def run(self): | |
result = self.run_teardown() | ||
if result: | ||
results.append(result) | ||
yield result | ||
if (results[-1].exceptions and Group.abort_on_exception) or results[-1].stopped: | ||
raise StopScript | ||
yield result | ||
if (results[-1].exceptions and Group.abort_on_exception) or results[ | ||
-1 | ||
].stopped: | ||
raise StopScript | ||
return results | ||
|
||
# Run a specific script method | ||
|
@@ -442,14 +446,18 @@ def run_method(self, object, method_name): | |
return result | ||
|
||
def run_setup(self): | ||
result = None | ||
if "setup" in dir(self): | ||
ScriptStatus.instance().status = f"{self.__class__} : setup" | ||
return self.run_script("setup") | ||
result = self.run_script("setup") | ||
return result | ||
|
||
def run_teardown(self): | ||
result = None | ||
if "teardown" in dir(self): | ||
ScriptStatus.instance().status = f"{self.__class__} : teardown" | ||
return self.run_script("teardown") | ||
result = self.run_script("teardown") | ||
return result | ||
|
||
@classmethod | ||
def get_num_scripts(cls): | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
(f"
doesn't exist anywhere in our ruby code