From f2851f5078cd60a1ce8b81a52cdb50c17dbfde71 Mon Sep 17 00:00:00 2001 From: Marvin Immesberger Date: Sun, 8 Dec 2024 19:02:18 +0100 Subject: [PATCH] Adjust test inputs for proper GETTSIM params. --- src/_gettsim_tests/test_data/namespaces/module1.py | 13 +++++++++---- src/_gettsim_tests/test_data/namespaces/module2.py | 8 ++++---- src/_gettsim_tests/test_namespaces.py | 4 ++-- 3 files changed, 15 insertions(+), 10 deletions(-) diff --git a/src/_gettsim_tests/test_data/namespaces/module1.py b/src/_gettsim_tests/test_data/namespaces/module1.py index cff5208cc..c50ca5224 100644 --- a/src/_gettsim_tests/test_data/namespaces/module1.py +++ b/src/_gettsim_tests/test_data/namespaces/module1.py @@ -1,17 +1,22 @@ """Test namespace.""" -def f(a, b): - return a + b +def f(module1_params, h): # noqa: ARG001 + return module1_params["a"] + module1_params["b"] -def g(f, c): - return f + c +def g(f, module1_params): + return f + module1_params["c"] + + +def h(): + return 1 FUNCTIONS_MODULE1 = { "module1": { "f": f, "g": g, + "h": h, } } diff --git a/src/_gettsim_tests/test_data/namespaces/module2.py b/src/_gettsim_tests/test_data/namespaces/module2.py index a94059ab2..884ffef6c 100644 --- a/src/_gettsim_tests/test_data/namespaces/module2.py +++ b/src/_gettsim_tests/test_data/namespaces/module2.py @@ -1,12 +1,12 @@ """Test namespace.""" -def f(a, b): - return a + b +def f(module2_params, g): # noqa: ARG001 + return module2_params["a"] + module2_params["b"] -def g(module1__f, c): - return module1__f + c +def g(module1__f, module2_params): + return module1__f + module2_params["c"] FUNCTIONS_MODULE2 = { diff --git a/src/_gettsim_tests/test_namespaces.py b/src/_gettsim_tests/test_namespaces.py index 8893f8438..fffb3d479 100644 --- a/src/_gettsim_tests/test_namespaces.py +++ b/src/_gettsim_tests/test_namespaces.py @@ -13,12 +13,12 @@ } PARAMETERS = { - "module1": { + "module1_params": { "a": 1, "b": 1, "c": 1, }, - "module2": { + "module2_params": { "a": 1, "b": 1, "c": 1,