From 45c37cb98de69bdb2544d973acea4f297407ede4 Mon Sep 17 00:00:00 2001 From: Maximilian Date: Fri, 20 Dec 2024 11:03:59 +0100 Subject: [PATCH] bundled gt tests into game_theory folder --- tests/tests_game_theory/__init__.py | 0 tests/{ => tests_game_theory}/test_aggregation.py | 0 tests/{ => tests_game_theory}/test_core.py | 0 tests/{ => tests_game_theory}/test_exact_computer.py | 10 ++++------ .../{ => tests_game_theory}/test_moebius_converter.py | 0 5 files changed, 4 insertions(+), 6 deletions(-) create mode 100644 tests/tests_game_theory/__init__.py rename tests/{ => tests_game_theory}/test_aggregation.py (100%) rename tests/{ => tests_game_theory}/test_core.py (100%) rename tests/{ => tests_game_theory}/test_exact_computer.py (98%) rename tests/{ => tests_game_theory}/test_moebius_converter.py (100%) diff --git a/tests/tests_game_theory/__init__.py b/tests/tests_game_theory/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/tests/test_aggregation.py b/tests/tests_game_theory/test_aggregation.py similarity index 100% rename from tests/test_aggregation.py rename to tests/tests_game_theory/test_aggregation.py diff --git a/tests/test_core.py b/tests/tests_game_theory/test_core.py similarity index 100% rename from tests/test_core.py rename to tests/tests_game_theory/test_core.py diff --git a/tests/test_exact_computer.py b/tests/tests_game_theory/test_exact_computer.py similarity index 98% rename from tests/test_exact_computer.py rename to tests/tests_game_theory/test_exact_computer.py index 12e48393..ddce2acf 100644 --- a/tests/test_exact_computer.py +++ b/tests/tests_game_theory/test_exact_computer.py @@ -151,17 +151,15 @@ def test_basic_functions(): def test_lazy_computation(): - """Tests if the lazy computation is correct.""" + """Tests if the lazy computation (calling without params) works.""" n = 5 soum = SOUM(n, n_basis_games=10) exact_computer = ExactComputer(n_players=n, game_fun=soum) isinstance(repr(exact_computer), str) isinstance(str(exact_computer), str) - # print("before call") - _ = exact_computer("SV", 1) - # print("after call") - # print(exact_computer.baseline_value) - # print(exact_computer.game_values) + sv = exact_computer("SV", 1) + assert sv.index == "SV" + assert sv.max_order == 1 @pytest.fixture diff --git a/tests/test_moebius_converter.py b/tests/tests_game_theory/test_moebius_converter.py similarity index 100% rename from tests/test_moebius_converter.py rename to tests/tests_game_theory/test_moebius_converter.py