nbval icon indicating copy to clipboard operation
nbval copied to clipboard

Conditional output comparison

Open eric-wieser opened this issue 5 years ago • 1 comments

It would be great if there were some way to make output comparison of a cell conditional, like how in a regular test one can write:

@pytest.mark.skipif(sys.version_info < (3, 5))

or

@pytest.mark.xfail(distutils.version.LooseVersion(sympy.__version__) < '1.5')

I'd be happy to help put together a PR to do this, but I don't really know where to start.

eric-wieser avatar May 21 '20 16:05 eric-wieser

Is possible to make notebooks aware of other pytest flags? For example:

pytest my_package --reference-data=/path/to/reference/data

where --reference-data points to a folder with required files to run the tests.

epassaro avatar Dec 18 '20 06:12 epassaro