sqlalchemy / sqlalchemy/mako

ExceptionsTest.test_alternating_file_names fails on pypy3

Open
#315 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Python
Stars
459
Forks
90
PR merge metrics
No merged PRs in 30d

Description

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 ================================================

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by running ExceptionsTest.test_alternating_file_names in test/test_exceptions.py under PyPy3 and compare its generated traceback with the assertion at line 460. The issue is done when the test passes under PyPy3 while retaining the expected alternating template file names and source lines in the traceback.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
testing
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.