No subject


Fri Feb 17 01:35:15 PST 2017


from due to any unhandled exception?

I saw a hook "pytest_exception_interact" But this hook is not meant for
these purposes and even otherwise this will be called even for exceptions
that i have handled inside the TestCase.

The "pytest_runtest_protocol"  description says that "*implements the
runtest_setup/call/teardown protocol for the given test item, including
capturing exceptions and calling reporting hooks.*"

But I wasnt able to find any examples how to do that..

Anjy pointers on how to proceed?


--=20
=E0=AE=85=E0=AE=A9=E0=AF=8D=E0=AE=AA=E0=AF=81=E0=AE=9F=E0=AE=A9=E0=AF=8D,
=E0=AE=AA=E0=AE=BE. =E0=AE=85=E0=AE=B0=E0=AF=81=E0=AE=A3=E0=AF=8D =E0=AE=95=
=E0=AE=BE=E0=AE=B3=E0=AE=BF =E0=AE=B0=E0=AE=BE=E0=AE=9A=E0=AE=BE

--f403045d57d8fe737e0548b6a0de
Content-Type: text/html; charset=UTF-8
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr">Hi,<div><br></div><div>Say i have a TestCase that doesnt a=
ssert when an exception is raised in certain cases... The Testcase executio=
n will stop when ever the exception is raised.</div><div><br></div><div>Fro=
m any of the pytest hooks can i know if the TestCase execution stopped from=
 due to any unhandled exception?</div><div><br></div><div>I saw a hook &quo=
t;<span style=3D"background-color:rgb(250,243,232);color:rgb(62,67,73);font=
-family:consolas,menlo,&quot;deja vu sans mono&quot;,&quot;bitstream vera s=
ans mono&quot;,monospace;font-size:20.4px;font-weight:bold">pytest_exceptio=
n_interact&quot;=C2=A0</span>But this hook is not meant for these purposes =
and even otherwise this will be called even for exceptions that i have hand=
led inside the TestCase.</div><div><br></div><div>The &quot;<span style=3D"=
color:rgb(62,67,73);font-family:consolas,menlo,&quot;deja vu sans mono&quot=
;,&quot;bitstream vera sans mono&quot;,monospace;font-size:20.4px;font-weig=
ht:bold">pytest_runtest_protocol&quot; =C2=A0</span>description says that &=
quot;<span style=3D"color:rgb(62,67,73);font-family:sans-serif"><i>implemen=
ts the runtest_setup/call/teardown protocol for the given test item, includ=
ing capturing exceptions and calling reporting hooks.</i><span style=3D"fon=
t-size:17px">&quot;=C2=A0</span><br><br></span>But I wasnt able to find any=
 examples how to do that..</div><div><br></div><div>Anjy pointers on how to=
 proceed?</div><div><br></div><div><br></div><div>--=C2=A0<br></div><div><d=
iv class=3D"gmail_signature">=E0=AE=85=E0=AE=A9=E0=AF=8D=E0=AE=AA=E0=AF=81=
=E0=AE=9F=E0=AE=A9=E0=AF=8D,<br>
=E0=AE=AA=E0=AE=BE. =E0=AE=85=E0=AE=B0=E0=AF=81=E0=AE=A3=E0=AF=8D =E0=AE=95=
=E0=AE=BE=E0=AE=B3=E0=AE=BF =E0=AE=B0=E0=AE=BE=E0=AE=9A=E0=AE=BE </div>
</div></div>

--f403045d57d8fe737e0548b6a0de--



More information about the testing-in-python mailing list