kynan / nbstripout

strip output from Jupyter and IPython notebooks
Other
1.19k stars 94 forks source link

Fix Testing for windows by stripping out Cram for the majority of tests #176

Closed arobrien closed 1 year ago

arobrien commented 1 year ago

Cram is abandoned (last release in 2016, and repository is now archived), so the currently broken tests on Windows will never get fixed if we stick with Cram.

This PR moves the end-to-end functionality testing (majority of the testing) out of Cram and into regular Pytests in test_end_to_end.py. We are now running the majority of tests on windows (again) and skip the cram tests with --nocram.

This goes some way towards alleviating #38, but does not solve it completely. #165 might still be worthwhile, because Cram does make the detailed shell interaction tests very convenient, but is less critical now. In the long term it would probably be better to create a more testable program structure to test much of this, but I don't propose to do that in this PR.

arobrien commented 1 year ago

I've moved all of the simple "run nbstripout and check the output" tests, and the tests are all passing on my fork (I'm using a Dummy PR to trigger them).

I'm having a look at diff and installation/status scripts now.

arobrien commented 1 year ago

I'm happy with how most of this has worked out for the end-to-end tests, and even testing the diff command, but the installation/status test scripts are turning out very messy when I try and port them over.

I think that leaving those as cram for now, even if they can't run on windows, is probably best. I'll try and implement a couple of very basic tests of the install functionality to complement them.

arobrien commented 1 year ago

I've given up on porting the diff and install/status scripts. We now have a lot more tests running on Windows, I'm calling that a win for this PR.