You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have this file as test3.py
If I run this with
py.test test3.py
I get the following output
$ py.test test3.py
============================= test session starts ==============================
platform linux2 -- Python 2.6.6 -- pytest-2.0.0
collected 1 items
def __init__(self, *args):
BuiltinAssertionError.__init__(self, *args)
if args:
try:
self.msg = str(args[0])
except py.builtin._sysex:
raise
except:
self.msg = "<[broken __repr__] %s at %0xd>" %(
args[0].__class__, id(args[0]))
else:
f = py.code.Frame(sys._getframe(1))
try:
source = f.code.fullsource
if source is not None:
try:
source = source.getstatement(f.lineno, assertion=True)
except IndexError:
source = None
else:
source = str(source.deindent()).strip()
except py.error.ENOENT:
source = None
# this can also occur during reinterpretation, when the
# co_filename is set to "<run>".
if source:
Originally reported by: Anonymous
import numpy as np
def test_array():
assert not(any(np.array([0, -1]) < 0))
I have this file as test3.py
If I run this with
py.test test3.py
I get the following output
$ py.test test3.py
============================= test session starts ==============================
platform linux2 -- Python 2.6.6 -- pytest-2.0.0
collected 1 items
test3.py F
=================================== FAILURES ===================================
__________________________________ test_array __________________________________
self = AssertionError()
/usr/local/lib/python2.6/dist-packages/py/_code/assertion.py:79:
source = 'assert not(any(np.array([0, -1]) < 0))'
frame = <py._code.code.Frame object at 0x96208cc>, should_fail = True
/usr/local/lib/python2.6/dist-packages/py/_code/_assertionnew.py:48:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
node = <_ast.Module object at 0x96788ac>
/usr/lib/python2.6/ast.py:231:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
mod = <_ast.Module object at 0x96788ac>
/usr/local/lib/python2.6/dist-packages/py/_code/_assertionnew.py:146:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
node = <_ast.Assert object at 0x967872c>
/usr/lib/python2.6/ast.py:231:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
assrt = <_ast.Assert object at 0x967872c>
/usr/local/lib/python2.6/dist-packages/py/_code/_assertionnew.py:319:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
node = <_ast.UnaryOp object at 0x96785ac>
/usr/lib/python2.6/ast.py:231:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
unary = <_ast.UnaryOp object at 0x96785ac>
/usr/local/lib/python2.6/dist-packages/py/_code/_assertionnew.py:202:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
node = <_ast.Call object at 0x96789cc>
/usr/lib/python2.6/ast.py:231:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
call = <_ast.Call object at 0x96789cc>
/usr/local/lib/python2.6/dist-packages/py/_code/_assertionnew.py:232:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
node = <_ast.Compare object at 0x9678a0c>
/usr/lib/python2.6/ast.py:231:
self = <py._code._assertionnew.DebugInterpreter object at 0x9678a4c>
comp = <_ast.Compare object at 0x9678a0c>
/usr/local/lib/python2.6/dist-packages/py/_code/_assertionnew.py:177: ValueError
=========================== 1 failed in 0.23 seconds ===========================
$
The text was updated successfully, but these errors were encountered: