Skip to content

Commit f76011c

Browse files
author
Cody D'Ambrosio
committed
fix formatting and test
1 parent 88ee20f commit f76011c

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

src/tap/line.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,8 @@ def __str__(self):
118118
f"{indent}{line}" for line in self._yaml_block.splitlines()
119119
)
120120
yaml_block = f"\n{indent}---\n{indented_yaml_block}\n{indent}..."
121-
return f"{is_not}ok {self.number} {self.description}{directive}{diagnostics}{yaml_block}"
121+
return (f"{is_not}ok {self.number} {self.description}{directive}"
122+
f"{diagnostics}{yaml_block}")
122123

123124

124125
class Plan(Line):

tests/test_line.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
from tap.line import Line, Result
55

66
try:
7-
import yaml
7+
import yaml # noqa
88
from more_itertools import peekable # noqa
99

1010
have_yaml = True
@@ -57,6 +57,6 @@ def test_yaml_block(self):
5757
result = Result(False, 46, "passing", raw_yaml_block=raw_yaml_block)
5858
if have_yaml:
5959
self.assertEqual(result.yaml_block["message"], "test_message")
60-
self.assertIn(str(result), " ---\n message: test_message\n severity: fail\n ...")
60+
self.assertIn(" ---\n message: test_message\n severity: fail\n ...", str(result))
6161
else:
6262
self.assertIsNone(result.yaml_block)

tests/test_tracker.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
from tap.tracker import Tracker
99

1010
try:
11-
import yaml
11+
import yaml # noqa
1212
from more_itertools import peekable # noqa
1313

1414
have_yaml = True

0 commit comments

Comments
 (0)