-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
edit makefile and add test to test.py
- Loading branch information
Showing
2 changed files
with
18 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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" | ||
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 |