Skip to content

ExceptionsTest.test_alternating_file_names fails on pypy3 #315

Description

@mgorny

When running mako's tests with pypy3, I get one failure:

==================================================================== FAILURES =====================================================================
___________________________________________________ ExceptionsTest.test_alternating_file_names ____________________________________________________
Traceback (most recent call last):
  File "/tmp/portage/dev-python/mako-1.1.1/work/Mako-1.1.1/test/test_exceptions.py", line 457, in test_alternating_file_names
    t.render()
  File "/tmp/portage/dev-python/mako-1.1.1/work/Mako-1.1.1/mako/template.py", line 476, in render
    return runtime._render(self, self.callable_, args, data)
  File "/tmp/portage/dev-python/mako-1.1.1/work/Mako-1.1.1/mako/runtime.py", line 883, in _render
    **_kwargs_for_callable(callable_, data)
  File "/tmp/portage/dev-python/mako-1.1.1/work/Mako-1.1.1/mako/runtime.py", line 920, in _render_context
    _exec_template(inherit, lclcontext, args=args, kwargs=kwargs)
  File "/tmp/portage/dev-python/mako-1.1.1/work/Mako-1.1.1/mako/runtime.py", line 947, in _exec_template
    callable_(context, *args, **kwargs)
  File "base_html", line 30, in render_body
  File "/usr/lib/pypy3.6/lib_pypy/_functools.py", line 80, in __call__
    return self._func(*(self._args + fargs), **fkeywords)
  File "foo_html", line 54, in render_foo
  File "/usr/lib/pypy3.6/lib_pypy/_functools.py", line 80, in __call__
    return self._func(*(self._args + fargs), **fkeywords)
  File "base_html", line 46, in render_foo
  File "base_html", line 17, in broken
RuntimeError: Something went wrong.

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/tmp/portage/dev-python/mako-1.1.1/work/Mako-1.1.1/test/test_exceptions.py", line 460, in test_alternating_file_names
    assert """
AssertionError: assert '\n  File "base.html", line 5, in render_body\n    %> body starts here\n  File "foo.html", line 4, in render_foo\n    ... render_foo\n    ${broken()}\n  File "base.html", line 4, in broken\n    raise RuntimeError("Something went wrong.")\n' in '\n\nTraceback (most recent call last):\n  File "/tmp/portage/dev-python/mako-1.1.1/work/Mako-1.1.1/test/test_exceptio..."base.html", line 4, in broken\n    raise RuntimeError("Something went wrong.")\nRuntimeError: Something went wrong.\n'
============================================================= short test summary info =============================================================
FAILED test/test_exceptions.py::ExceptionsTest::test_alternating_file_names - AssertionError: assert '\n  File "base.html", line 5, in render_bo...
================================================ 1 failed, 415 passed, 53 skipped in 23.80 seconds ================================================

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions