From 669bebc330ac0a8bc9a490c3632fd649fe579c0a Mon Sep 17 00:00:00 2001 From: Nour Shawky Date: Thu, 11 Apr 2024 03:32:23 -0700 Subject: [PATCH] adjusting from statment to reference package name in all test files --- tests/test_classification_metrics.py | 4 ++-- tests/test_feature_importance.py | 3 +-- tests/test_model_cross_val.py | 3 +-- 3 files changed, 4 insertions(+), 6 deletions(-) diff --git a/tests/test_classification_metrics.py b/tests/test_classification_metrics.py index c8f18c0..dc7a222 100644 --- a/tests/test_classification_metrics.py +++ b/tests/test_classification_metrics.py @@ -3,8 +3,8 @@ import sys import os -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -from src.function_classification_metrics import calculate_classification_metrics + +from src.py_predpurchase import calculate_classification_metrics def test_perfect_predictions(): """ diff --git a/tests/test_feature_importance.py b/tests/test_feature_importance.py index 354f70e..e67f302 100644 --- a/tests/test_feature_importance.py +++ b/tests/test_feature_importance.py @@ -7,8 +7,7 @@ from sklearn.ensemble import RandomForestClassifier from sklearn.linear_model import LinearRegression -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -from src.function_feature_importance import get_feature_importances +from src.py_predpurchase import get_feature_importances # creating a mock model diff --git a/tests/test_model_cross_val.py b/tests/test_model_cross_val.py index 4aea4d7..a6a20cf 100644 --- a/tests/test_model_cross_val.py +++ b/tests/test_model_cross_val.py @@ -3,8 +3,7 @@ import sys import os -sys.path.append(os.path.join(os.path.dirname(__file__), '..')) -from src.function_model_cross_val import model_cross_validation +from src.py_predpurchase import model_cross_validation @pytest.fixture def test_data():