[issue2551336] FAILED test/test_templating.py::Markdown2TestCase::test_string_markdown_link_item - AssertionErro

Viorel <[email protected]> Sat, 20 Apr 2024 11:48:43 +0000
Newsgroups gmane.comp.bug-tracking.roundup.devel
Message-ID <[email protected]>
New submission from Viorel:

Thank you for fixing issue #2551272

There are 2 more tests that fail in test_templating.py::Markdown2TestCase, tested with python 3.11 and python 3.12.

______________________________________ Markdown2TestCase.test_string_markdown_link_item _______________________________________

self = <test.test_templating.Markdown2TestCase testMethod=test_string_markdown_link_item>

    def test_string_markdown_link_item(self):
        """ The link formats for the different markdown engines changes.
            Order of attributes, value for rel (noopener, nofollow etc)
            is different. So most tests check for a substring that indicates
            success rather than the entire returned string.
        """
        p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'An issue1 link'))
        self.assertIn( u2s(u'href="issue1"'), p.markdown().strip())
        # just verify that plain linking is working
        self.assertIn( u2s(u'href="issue1"'), p.plain(hyperlink=1))
    
        p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'An [issue1](issue1) link'))
        self.assertIn( u2s(u'href="issue1"'), p.markdown().strip())
        # just verify that plain linking is working
        self.assertIn( u2s(u'href="issue1"'), p.plain(hyperlink=1))
    
        p = StringHTMLProperty(self.client, 'test', '1', None, 'test', u2s(u'An [issue1](https://example.com/issue1) link'))
>       self.assertIn( u2s(u'href="https://example.com/issue1"'), p.markdown().strip())
E       AssertionError: 'href="https://example.com/issue1"' not found in '<p>An <a href="#">issue1</a> link</p>'

p          = <StringHTMLProperty(0x7f927064fc10) test1@test None 'An [issue1](https://example.com/issue1) link'>
self       = <test.test_templating.Markdown2TestCase testMethod=test_string_markdown_link_item>

test/test_templating.py:797: AssertionError

----------
components: Test
messages: 7990
nosy: ceamac
severity: normal
status: new
title: FAILED test/test_templating.py::Markdown2TestCase::test_string_markdown_link_item - AssertionErro
type: compile error
versions: 2.3.0

_________________________________________________
Roundup tracker <[email protected]>
<https://issues.roundup-tracker.org/issue2551336>
_________________________________________________