Skip to content
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

test_striptags regressed with markupsafe 2.1.4 #1930

Closed
mweinelt opened this issue Jan 26, 2024 · 1 comment
Closed

test_striptags regressed with markupsafe 2.1.4 #1930

mweinelt opened this issue Jan 26, 2024 · 1 comment

Comments

@mweinelt
Copy link

mweinelt commented Jan 26, 2024

After upgrading markupsafe to 2.1.4 in nixpkgs, we are seeing test_striptags fail. The comparison string seems to have gained a trailing space.

pallets/markupsafe#417

__________________________ TestFilter.test_striptags ___________________________

self = <test_filters.TestFilter object at 0x7ffff5795cd0>
env = <jinja2.environment.Environment object at 0x7ffff597a0d0>

    def test_striptags(self, env):
        tmpl = env.from_string("""{{ foo|striptags }}""")
        out = tmpl.render(
            foo='  <p>just a small   \n <a href="#">'
            "example</a> link</p>\n<p>to a webpage</p> "
            "<!-- <p>and some commented stuff</p> -->"
        )
>       assert out == "just a small example link to a webpage"
E       AssertionError: assert 'just a small...to a webpage ' == 'just a small... to a webpage'
E         - just a small example link to a webpage
E         + just a small example link to a webpage 
E         ?                                       +

tests/test_filters.py:101: AssertionError

Expectations

The issue seems to be in markupsafe, so maybe you want to exclude that version.

Reproducer

  • Upgrade markupsafe to 2.1.4
  • Run the test suite

Environment:

  • Python version: 3.11.7
  • Jinja version: 3.1.3
@davidism
Copy link
Member

Already reported to MarkupSafe pallets/markupsafe#417

bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Jan 29, 2024
https://build.opensuse.org/request/show/1142212
by user dgarcia + anag+factory
- Disable broken test with latest version of MarkupSafe (2.1.4)
  (gh#pallets/jinja#1930, gh#pallets/markupsafe#417)
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Feb 7, 2024
https://build.opensuse.org/request/show/1142212
by user dgarcia + anag+factory
- Disable broken test with latest version of MarkupSafe (2.1.4)
  (gh#pallets/jinja#1930, gh#pallets/markupsafe#417)
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Feb 7, 2024
https://build.opensuse.org/request/show/1142212
by user dgarcia + anag+factory
- Disable broken test with latest version of MarkupSafe (2.1.4)
  (gh#pallets/jinja#1930, gh#pallets/markupsafe#417)
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 10, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants