yt-project / yt_astro_analysis

yt astrophysical analysis modules
Other
21 stars 21 forks source link

TST: migrate from nosetest to pytest #238

Open neutrinoceros opened 11 months ago

neutrinoceros commented 11 months ago

this is a subset of #229, focusing on migrating out of nosetest + yt's answer testing framework by rewriting tests in a simpler fashion with pytest

This PR removes nosetest as a requirement for tests. Namely, answer tests are converted to simple pytest functions (reference results are inlined). As a result, imports from yt.testing.answer_testing.framework are also dropped.

neutrinoceros commented 10 months ago

I updated the PR description. You are right that, I'm effectively diminishing the flexibility of what tests can be implemented because I am not replacing the answer test framework by anything equivalent. To be clear, replacing this framework is a non-goal (to me). I'm just observing that

My personal opinion is that it justifies dropping nose as a dependency, which would simplify maintenance. Porting the framework to pytest is a substantial undertaking that I think should happen upstream (in yt itself), and that I have no desire to champion. This by no means implies that I want to impose this proposal as the de-facto way forward, but I want to make it clear what my personal limits are early in the discussion :-)

neutrinoceros commented 7 months ago

@brittonsmith I should disclose that I do not see myself returning to this in the foreseeable future. I understand your objections but don't have the bandwidth to address them. Migrating from nose to pytest is a long-due necessity (here as well as in yt), but maybe this isn't the right approach for the project. Anyway, I will keep this open for another month or two in case anyone wants to continue it, and if nothing happens I'll just close it. Thanks for understanding.

brittonsmith commented 5 months ago

@neutrinoceros sorry for being silent on this for so long. I've just been overwhelmed with teaching since last fall. I've discussed this with @cphyc and we're willing to take over responsibility for it. What we're probably going to do is simply write new tests for this package to use pytest straight away rather than trying to port what we have now. We're going to punt on this until the summer, but have committed to returning to it then. Let's leave this open for now and we will take over.