From 20cceed2de64c5cd756506841d9eeab322aee44e Mon Sep 17 00:00:00 2001 From: "Kacper Kowalik (Xarthisius)" Date: Thu, 1 Jul 2021 13:28:59 -0500 Subject: [PATCH] Change the loop order to avoid executing the same test 3 times --- yt/utilities/answer_testing/framework.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yt/utilities/answer_testing/framework.py b/yt/utilities/answer_testing/framework.py index 720e2800e7c..d466039ccab 100644 --- a/yt/utilities/answer_testing/framework.py +++ b/yt/utilities/answer_testing/framework.py @@ -1193,13 +1193,13 @@ def small_patch_amr(ds_fn, fields, input_center="max", input_weight=("gas", "den yield ParentageRelationshipsTest(ds_fn) for field in fields: yield GridValuesTest(ds_fn, field) - for axis in [0, 1, 2]: - for dobj_name in dso: + for dobj_name in dso: + for axis in [0, 1, 2]: for weight_field in [None, input_weight]: yield ProjectionValuesTest( ds_fn, axis, field, weight_field, dobj_name ) - yield FieldValuesTest(ds_fn, field, dobj_name) + yield FieldValuesTest(ds_fn, field, dobj_name) def big_patch_amr(ds_fn, fields, input_center="max", input_weight=("gas", "density")):