-
Notifications
You must be signed in to change notification settings - Fork 30
Support raw yaml block in tracker #167
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
base: main
Are you sure you want to change the base?
Changes from 16 commits
7550bff
d1d9a70
e7a1694
bb73fda
730e5f4
4f1530b
d352ac0
e87aa3b
80ed66a
9280bfb
88ee20f
fc0c045
f76011c
4b9b556
9b8cecb
88cb8b8
579effb
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 | ||||
|---|---|---|---|---|---|---|
|
|
@@ -111,7 +111,17 @@ def __str__(self): | |||||
| diagnostics = "" | ||||||
| if self.diagnostics is not None: | ||||||
| diagnostics = "\n" + self.diagnostics.rstrip() | ||||||
| return f"{is_not}ok {self.number} {self.description}{directive}{diagnostics}" | ||||||
| yaml_block = "" | ||||||
| if self._yaml_block is not None: | ||||||
| indent = " " | ||||||
| indented_yaml_block = "\n".join( | ||||||
| f"{indent}{line}" for line in self._yaml_block.splitlines() | ||||||
| ) | ||||||
| yaml_block = f"\n{indent}---\n{indented_yaml_block}\n{indent}..." | ||||||
|
||||||
| yaml_block = f"\n{indent}---\n{indented_yaml_block}\n{indent}..." | |
| yaml_block = f"\n{indent}---\n{indented_yaml_block}\n{indent}...\n" |
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.
No newline needed here. in Tracker.generate_tap_report it calls print for each Line object. a Result is still a "Line" (even though it's actually multi-line).
def generate_tap_report(self, test_case, tap_lines, out_file):
self._write_test_case_header(test_case, out_file)
for tap_line in tap_lines:
print(tap_line, file=out_file)
Plus for reassurance, you can see that even if there was no yaml block added, diagnostics in this method did not have a trailing newline either
Uh oh!
There was an error while loading. Please reload this page.