From 901253f9668e231dc2d42c1cff8cec446a0e979c Mon Sep 17 00:00:00 2001 From: John Gerrard Holland Date: Wed, 22 Nov 2023 08:21:39 -0500 Subject: [PATCH] =?UTF-8?q?test:=20simplify=20variablecollection=20generat?= =?UTF-8?q?ion=20to=20speed=20up=20generation=20some=20more=20=E2=80=93=20?= =?UTF-8?q?allow=20shrinking=20of=20ivs,=20dvs=20and=20covariates=20togeth?= =?UTF-8?q?er?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- tests/test_strategies.py | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/tests/test_strategies.py b/tests/test_strategies.py index 1ea997ed..38503755 100644 --- a/tests/test_strategies.py +++ b/tests/test_strategies.py @@ -128,9 +128,13 @@ def variablecollection_strategy( if num_variables is not None: n_ivs, n_dvs, n_covariates = num_variables else: # num_variables is None - n_ivs = draw(st.integers(min_value=1, max_value=max_length)) - n_dvs = draw(st.integers(min_value=1, max_value=max_length)) - n_covariates = draw(st.integers(min_value=0, max_value=max_length)) + n_ivs, n_dvs, n_covariates = draw( + st.tuples( + st.integers(min_value=1, max_value=max_length), + st.integers(min_value=1, max_value=max_length), + st.integers(min_value=0, max_value=max_length), + ) + ) n_variables = n_ivs + n_dvs + n_covariates