diff --git a/Makefile b/Makefile index 8e33cbe..9c4900c 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,7 @@ install: pip install -r requirements.txt test: - python -m pytest app.py + python -m pytest test.py #--nbval notebook/EDA.ipynb notebook/MODEL_TRAINING.ipynb format: diff --git a/test.py b/test.py index 31a02a2..28eb181 100644 --- a/test.py +++ b/test.py @@ -1,7 +1,23 @@ from src.components.data_ingestion import DataIngestion +from src.components.data_transformation import DataTransformation def test_data_ingestion_output(): obj = DataIngestion() train_data, test_data = obj.initiate_data_ingestion() assert train_data == "artifacts/train.csv" - assert test_data == "artifacts/test.csv" \ No newline at end of file + assert test_data == "artifacts/test.csv" + + +def test_data_transformation_output(): + obj = DataTransformation() + preprocessor = obj.get_data_transformer_object() + assert preprocessor is not None + + train_path = "artifacts/train.csv" + test_path = "artifacts/test.csv" + + train_arr, test_arr, preprocessor_path = obj.initiate_data_transformation(train_path, test_path) + + assert train_arr is not None + assert test_arr is not None + assert preprocessor_path is not None \ No newline at end of file