scipy / scipy_doctest

Floating-point aware doctesting
BSD 3-Clause "New" or "Revised" License
5 stars 4 forks source link

configure pytest to use the DTRunner #84

Closed Sheila-nk closed 1 year ago

ev-br commented 1 year ago

I actually wonder if this is needed if test runs are driven through pytest.

Sheila-nk commented 1 year ago

Mhhh, I will have to look into this. Maybe there is something different about the DTRunner. But if we decide to close this issue, I'd like to add some test cases for the plugin just to ensure that the default pytest runner is behaving as expected. Especially for these test failures when I run python -m pytest --doctest-module which I believe are expected failures.

Screenshot 2023-07-27 at 12 59 50
ev-br commented 1 year ago

Good point about failure_cases. They are indeed failing, and 'old-way' tests check that they do. Would be great to restructure these so that they pass both ways.

local_file_cases need config.local_resources, so indeed are excted to fail until the plugin does not understand non-default DTConfigs.

Sheila-nk commented 1 year ago

Would be great to restructure these so that they pass both ways.

Can you elaborate on what you mean by this?

Okay, so local_file_cases will probably pass when we configure pytest options using DTConfig? Not sure how to do that yet though, will look into it.

Sheila-nk commented 1 year ago

Pytest has now been configured to use a special runner that is a subclass of DebugDTRunner. Closing this issue as completed by merging of #87