--- you can reply above this line ---

New issue 274: INTERNALERROR when running doctest
https://bitbucket.org/hpk42/pytest/issue/274/internalerror-when-running-doctest

Takafumi Arakaki:

Clone my pytest-doctest-error branch of Jedi 
(https://github.com/tkf/jedi/tree/pytest-doctest-error) and run `py.test 
--doctest-modules jedi/api_classes.py`.  I have this error:

```
#!tb

============================= test session starts ==============================
platform linux2 -- Python 2.7.2 -- pytest-2.3.4
plugins: xdist, ipdb
collected 1 items

jedi/api_classes.py 
INTERNALERROR> Traceback (most recent call last):
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/main.py", 
line 81, in wrap_session
INTERNALERROR>     doit(config, session)
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/main.py", 
line 113, in _main
INTERNALERROR>     config.hook.pytest_runtestloop(session=session)
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 422, in __call__
INTERNALERROR>     return self._docall(methods, kwargs)
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 433, in _docall
INTERNALERROR>     res = mc.execute()
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 351, in execute
INTERNALERROR>     res = method(**kwargs)
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/main.py", 
line 133, in pytest_runtestloop
INTERNALERROR>     item.config.hook.pytest_runtest_protocol(item=item, 
nextitem=nextitem)
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 422, in __call__
INTERNALERROR>     return self._docall(methods, kwargs)
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 433, in _docall
INTERNALERROR>     res = mc.execute()
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 351, in execute
INTERNALERROR>     res = method(**kwargs)
INTERNALERROR>   File 
"/.../local/lib/python2.7/site-packages/_pytest/runner.py", line 62, in 
pytest_runtest_protocol
INTERNALERROR>     runtestprotocol(item, nextitem=nextitem)
INTERNALERROR>   File 
"/.../local/lib/python2.7/site-packages/_pytest/runner.py", line 69, in 
runtestprotocol
INTERNALERROR>     reports.append(call_and_report(item, "call", log))
INTERNALERROR>   File 
"/.../local/lib/python2.7/site-packages/_pytest/runner.py", line 100, in 
call_and_report
INTERNALERROR>     report = hook.pytest_runtest_makereport(item=item, call=call)
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/main.py", 
line 157, in call_matching_hooks
INTERNALERROR>     return hookmethod.pcall(plugins, **kwargs)
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 426, in pcall
INTERNALERROR>     return self._docall(methods, kwargs)
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 433, in _docall
INTERNALERROR>     res = mc.execute()
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 351, in execute
INTERNALERROR>     res = method(**kwargs)
INTERNALERROR>   File 
"/.../local/lib/python2.7/site-packages/_pytest/capture.py", line 171, in 
pytest_runtest_makereport
INTERNALERROR>     rep = __multicall__.execute()
INTERNALERROR>   File "/.../local/lib/python2.7/site-packages/_pytest/core.py", 
line 351, in execute
INTERNALERROR>     res = method(**kwargs)
INTERNALERROR>   File 
"/.../local/lib/python2.7/site-packages/_pytest/runner.py", line 191, in 
pytest_runtest_makereport
INTERNALERROR>     longrepr = item.repr_failure(excinfo)
INTERNALERROR>   File 
"/.../local/lib/python2.7/site-packages/_pytest/doctest.py", line 44, in 
repr_failure
INTERNALERROR>     lineno = test.lineno + example.lineno + 1
INTERNALERROR> TypeError: unsupported operand type(s) for +: 'NoneType' and 
'int'

===============================  in 0.86 seconds ===============================
```

Note that `nosetests --with-doctest jedi/api_classes.py` works.  It reports:

```
Ran 4 tests in 1.509s

FAILED (failures=1)
```


--

This is an issue notification from bitbucket.org. You are receiving
this either because you are the owner of the issue, or you are
following the issue.
_______________________________________________
pytest-commit mailing list
pytest-commit@python.org
http://mail.python.org/mailman/listinfo/pytest-commit

Reply via email to