Test autoconfig


In [1]:
import ipytest
ipytest.autoconfig()

Successful tests


In [2]:
%%run_pytest[clean]

def test_foo():
    assert True is True


.                                                                                                                                                                           [100%]
1 passed in 0.02 seconds

In [3]:
assert ipytest.exit_code == 0

Failing tests


In [4]:
%%run_pytest[clean]

def test_foo():
    assert True is False


F                                                                                                                                                                           [100%]
==================================================================================== FAILURES =====================================================================================
____________________________________________________________________________________ test_foo _____________________________________________________________________________________

    def test_foo():
>       assert True is False
E       assert True is False

<ipython-input-4-056d17306b90>:2: AssertionError
1 failed in 0.32 seconds

In [5]:
assert ipytest.exit_code == 1