diff --git a/tests/test_hawk.py b/tests/test_hawk.py index b0712e0..6516380 100644 --- a/tests/test_hawk.py +++ b/tests/test_hawk.py @@ -2,12 +2,13 @@ """Tests for `hawk` package.""" +import pandas as pd import pytest - from click.testing import CliRunner # noqa: F401 import hawk # noqa: F401 from hawk import cli # noqa: F401 +from hawk.analysis import CausalAnalysis @pytest.fixture @@ -24,3 +25,32 @@ def test_content(response): """Sample pytest test function with the pytest fixture as an argument.""" # from bs4 import BeautifulSoup # assert 'GitHub' in BeautifulSoup(response.content).title.string + + +def test_causal_analysis(): + df_train = pd.read_csv("analysis/demo/Ticino_train.csv", header=0) + df_test = pd.read_csv("analysis/demo/Ticino_test.csv", header=0) + target_column_name = "target" + pcmci_test_choice = "ParCorr" + pcmci_max_lag = 0 + tefs_direction = "forward" + tefs_use_contemporary_features = True + tefs_max_lag_features = 1 + tefs_max_lag_target = 1 + workdir = "tests/output" + + causal_analysis = CausalAnalysis( + df_train, + df_test, + target_column_name, + pcmci_test_choice, + pcmci_max_lag, + tefs_direction, + tefs_use_contemporary_features, + tefs_max_lag_features, + tefs_max_lag_target, + workdir, + response=None, + ) + + causal_analysis.run()