Compare commits
1 Commits
b70baa0eb8
...
9b319a90dc
Author | SHA1 | Date | |
---|---|---|---|
![]() |
9b319a90dc |
@ -884,7 +884,7 @@ class Headline:
|
||||
|
||||
names_by_line = {}
|
||||
for kw in self.keywords:
|
||||
if kw.key == 'NAME':
|
||||
if kw.key == "NAME":
|
||||
names_by_line[kw.linenum] = kw.value
|
||||
|
||||
name = None
|
||||
|
@ -480,10 +480,7 @@ class TestSerde(unittest.TestCase):
|
||||
|
||||
snippets = list(doc.get_code_snippets())
|
||||
self.assertEqual(len(snippets), 3)
|
||||
self.assertEqual(
|
||||
snippets[0].name,
|
||||
'first-code-name'
|
||||
)
|
||||
self.assertEqual(snippets[0].name, "first-code-name")
|
||||
self.assertEqual(
|
||||
snippets[0].content,
|
||||
'echo "This is a test"\n'
|
||||
@ -498,10 +495,7 @@ class TestSerde(unittest.TestCase):
|
||||
"This is a test\n" + "with two lines",
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
snippets[1].name,
|
||||
None
|
||||
)
|
||||
self.assertEqual(snippets[1].name, None)
|
||||
self.assertEqual(
|
||||
snippets[1].content,
|
||||
'echo "This is another test"\n'
|
||||
@ -512,10 +506,7 @@ class TestSerde(unittest.TestCase):
|
||||
snippets[1].result, "This is another test\n" + "with two lines too"
|
||||
)
|
||||
|
||||
self.assertEqual(
|
||||
snippets[2].name,
|
||||
None
|
||||
)
|
||||
self.assertEqual(snippets[2].name, None)
|
||||
self.assertEqual(
|
||||
snippets[2].content,
|
||||
"/* This code has to be escaped to\n"
|
||||
|
Loading…
Reference in New Issue
Block a user