import pytest from slz_appreciationengine_prepare_configuration.utils import shuffle_contexts @pytest.mark.parametrize( 'contexts, expected', [ (['AD'], [['AD']]), (['AD', 'AE'], [['AD', 'AE']]), ( ['AD', 'AE', 'AF', 'GB', 'DE', 'US', 'FR' ], [['AD', 'GB', 'FR'], ['AE', 'DE'], ['AF', 'US']] ), ] ) def test_shuffle_context(contexts, expected): result = shuffle_contexts( contexts, max_executions=3, min_ctxs_to_shuffle=4, ) assert result == expected