Lund-Observatory-Teaching / lundpython

2 stars 0 forks source link

Overhaul of excercises to be based on tests #68

Open AlinderS opened 1 year ago

AlinderS commented 1 year ago

This idea comes from rustlings, a tutorial with many small exercises that are corrected by pre-made tests. Our exercises could also be made such that the code the student writes needs to produce a certain output that passes a test rather than the student themselves checking the result against a piece of text.

This would require writing tests for all exercises and integrating them into the notebooks in some nice way.

AlinderS commented 1 year ago

How would this work for session 3? How does one test for plots? The only way I have seen so far is to test that a plot has been made, but that is not what we need.

eerovaher commented 1 year ago

astropy uses pytest-mpl for image tests.