Skip to content

Commit 9a57904

Browse files
committed
try to get more info on failing test
looks like m is not being formatted for markdown2 test case. No idea why. Trying to make output more verbose to figure out what's happening. pip in ci reports version 2.4.2 of markdown2 according to: https://app.travis-ci.com/github/roundup-tracker/roundup/jobs/568309619 same version I run locally with python 3.6.9. Fails in CI on 3.6, 3.8, 3.10.4. python 2.7 works on with version 2.3.10 of markdown2
1 parent 224c1c3 commit 9a57904

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

test/test_templating.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -714,7 +714,12 @@ def test_string_markdown_code_block_attribute(self):
714714
elif type(self) == MarkdownTestCase:
715715
self.assertEqual(m.replace('\n\n','\n'), '<p>embedded code block &lt;pre&gt;</p>\n<pre><code class="language-python">line 1\nline 2\n</code></pre>\n<p>new &lt;/pre&gt; paragraph</p>')
716716
else:
717-
self.assertEqual(m.replace('\n\n', '\n'), '<p>embedded code block &lt;pre&gt;</p>\n<div class="codehilite"><pre><span></span><code><span class="n">line</span> <span class="mi">1</span>\n<span class="n">line</span> <span class="mi">2</span>\n</code></pre></div>\n<p>new &lt;/pre&gt; paragraph</p>')
717+
test_output = m.replace('\n\n', '\n')
718+
expected_result = '<p>embedded code block &lt;pre&gt;</p>\n<div class="codehilite"><pre><span></span><code><span class="n">line</span> <span class="mi">1</span>\n<span class="n">line</span> <span class="mi">2</span>\n</code></pre></div>\n<p>new &lt;/pre&gt; paragraph</p>g'
719+
if test_output != expected_result:
720+
print("test_output:", test_output, file=sys.stderr)
721+
print("expected_result:", expected_result, file=sys.stderr)
722+
self.assertEqual( test_output, expected_result)
718723

719724
def test_markdown_return_text_on_exception(self):
720725
''' string is invalid markdown. missing end of fenced code block '''

0 commit comments

Comments
 (0)