LineaLabs / lineapy

Move fast from data science prototype to pipeline. Capture, analyze, and transform messy notebooks into data pipelines with just two lines of code.
https://lineapy.org
Apache License 2.0
662 stars 58 forks source link

Fix cleanup for Lineapy tests #818

Closed andycui97 closed 1 year ago

andycui97 commented 1 year ago

Description

Fixes tests/notebook/test_airflow.ipynb tests/test_ipython::test_to_airflow_* tests/test_script.py::test_slice_housing_airflow

These tests were creating files that were not cleaned up correctly during the testing. This behavior has been fixed.

Also refactored the 4 test_to_airflow tests in test_ipython to be parametrized and use a shared fixture.

Type of change

How Has This Been Tested?

Run pytests

lionsardesai commented 1 year ago

when parametrizing, the snapshots get a pesky autogenerated name. to prevent this, you can pass ids to all the parameters so that they get used instead of values of parameters.

andycui97 commented 1 year ago

when parametrizing, the snapshots get a pesky autogenerated name. to prevent this, you can pass ids to all the parameters so that they get used instead of values of parameters.

sgtm, adding