From 9d2eb14695965569cede9fc4d4cb5b8270320cbb Mon Sep 17 00:00:00 2001 From: Rasmus Oersoe Date: Tue, 26 Sep 2023 12:29:13 +0200 Subject: [PATCH] add func calls to new unit tests --- tests/examples/01_icetray/test_icetray_examples.py | 7 +++++++ tests/examples/02_data/test_data_examples.py | 7 +++++++ tests/examples/03_weights/test_weights_examples.py | 5 +++++ tests/examples/04_training/test_training_examples.py | 7 +++++++ 4 files changed, 26 insertions(+) diff --git a/tests/examples/01_icetray/test_icetray_examples.py b/tests/examples/01_icetray/test_icetray_examples.py index ddd99423e..613e90bf9 100644 --- a/tests/examples/01_icetray/test_icetray_examples.py +++ b/tests/examples/01_icetray/test_icetray_examples.py @@ -28,3 +28,10 @@ def test_04_i3_module_in_native_icetray_example() -> None: runpy.run_path( os.path.join(EXAMPLE_PATH, "04_i3_module_in_native_icetray_example.py") ) + + +if __name__ == "__main__": + test_01_convert_i3_files() + test_02_compare_sqlite_and_parquet() + test_03_i3_deployer_example() + test_04_i3_module_in_native_icetray_example() diff --git a/tests/examples/02_data/test_data_examples.py b/tests/examples/02_data/test_data_examples.py index 2d076151a..434e60e23 100644 --- a/tests/examples/02_data/test_data_examples.py +++ b/tests/examples/02_data/test_data_examples.py @@ -28,3 +28,10 @@ def test_03_convert_parquet_to_sqlite() -> None: def test_04_ensemble_dataset() -> None: """Test for 04_ensemble_dataset.""" runpy.run_path(os.path.join(EXAMPLE_PATH, "04_ensemble_dataset.py")) + + +if __name__ == "__main__": + test_01_read_dataset() + test_02_plot_feature_distribution() + test_03_convert_parquet_to_sqlite() + test_04_ensemble_dataset() diff --git a/tests/examples/03_weights/test_weights_examples.py b/tests/examples/03_weights/test_weights_examples.py index 8715fefc6..a810d0236 100644 --- a/tests/examples/03_weights/test_weights_examples.py +++ b/tests/examples/03_weights/test_weights_examples.py @@ -14,3 +14,8 @@ def test_01_fit_uniform_weights() -> None: def test_02_fit_bjoern_low_weights() -> None: """Test for 02_fit_bjoern_low_weights.""" runpy.run_path(os.path.join(EXAMPLE_PATH, "02_fit_bjoern_low_weights.py")) + + +if __name__ == "__main__": + test_01_fit_uniform_weights() + test_02_fit_bjoern_low_weights() diff --git a/tests/examples/04_training/test_training_examples.py b/tests/examples/04_training/test_training_examples.py index 086f0fed7..0fbaee52c 100644 --- a/tests/examples/04_training/test_training_examples.py +++ b/tests/examples/04_training/test_training_examples.py @@ -28,3 +28,10 @@ def test_04_train_multiclassifier_from_configs() -> None: runpy.run_path( os.path.join(EXAMPLE_PATH, "04_train_multiclassifier_from_configs.py") ) + + +if __name__ == "__main__": + test_01_train_dynedge() + test_02_train_tito_model() + test_03_train_dynedge_from_config() + test_04_train_multiclassifier_from_configs()