Re: Question on pytest example code

2016-01-10 Thread Terry Reedy
On 1/10/2016 2:38 PM, Robert wrote: Hi, Below is a code snippet from pytest package. It passes pytest, i.e. there is no failure report. # content of test_sysexit.py import pytest def f(): raise SystemExit(1) def test_mytest(): with pytest.raises(SystemExit): f() I se

Question on pytest example code

2016-01-10 Thread Robert
Hi, Below is a code snippet from pytest package. It passes pytest, i.e. there is no failure report. # content of test_sysexit.py import pytest def f(): raise SystemExit(1) def test_mytest(): with pytest.raises(SystemExit): f() I see that f() will generate 'SystemExit(1)'.