August 2018
Beginner
160 pages
4h 8m
English
Finally, you can imperatively trigger an XFAIL result within a test by calling the pytest.xfail function:
def test_particle_splitting(): initialize_physics() import numpy if numpy.__version__ < "1.13": pytest.xfail("split computation fails with numpy < 1.13") ...
Similar to pytest.skip, this is useful when you can only determine whether you need to mark a test as xfail at runtime.
Read now
Unlock full access