[yt-svn] commit/yt: ngoldbaum: Merged in xarthisius/yt (pull request #1771)

commits-noreply at bitbucket.org commits-noreply at bitbucket.org
Mon Oct 5 11:32:57 PDT 2015


1 new commit in yt:

https://bitbucket.org/yt_analysis/yt/commits/2f9567467117/
Changeset:   2f9567467117
Branch:      yt
User:        ngoldbaum
Date:        2015-10-05 18:32:42+00:00
Summary:     Merged in xarthisius/yt (pull request #1771)

Give meaningful names to answer tests
Affected #:  4 files

diff -r 6824ad32014e5813f6c8ac3882ba88189ed2753d -r 2f95674671178a4868f4f6aeff56b041127d189e yt/frontends/gadget/tests/test_outputs.py
--- a/yt/frontends/gadget/tests/test_outputs.py
+++ b/yt/frontends/gadget/tests/test_outputs.py
@@ -60,10 +60,12 @@
 def test_iso_collapse():
     for test in sph_answer(isothermal_h5, 'snap_505', 2**17,
                            iso_fields, ds_kwargs=iso_kwargs):
+        test_iso_collapse.__name__ = test.description
         yield test
 
 @requires_ds(gdg, big_data=True)
 def test_gadget_disk_galaxy():
     for test in sph_answer(gdg, 'snapshot_200', 11907080, gdg_fields,
                            ds_kwargs=gdg_kwargs):
+        test_gadget_disk_galaxy.__name__ = test.description
         yield test

diff -r 6824ad32014e5813f6c8ac3882ba88189ed2753d -r 2f95674671178a4868f4f6aeff56b041127d189e yt/frontends/owls/tests/test_outputs.py
--- a/yt/frontends/owls/tests/test_outputs.py
+++ b/yt/frontends/owls/tests/test_outputs.py
@@ -46,6 +46,7 @@
 @requires_ds(os33, big_data=True)
 def test_snapshot_033():
     for test in sph_answer(os33, 'snap_033', 2*128**3, _fields):
+        test_snapshot_033.__name__ = test.description
         yield test
 
 

diff -r 6824ad32014e5813f6c8ac3882ba88189ed2753d -r 2f95674671178a4868f4f6aeff56b041127d189e yt/frontends/tipsy/tests/test_outputs.py
--- a/yt/frontends/tipsy/tests/test_outputs.py
+++ b/yt/frontends/tipsy/tests/test_outputs.py
@@ -111,6 +111,7 @@
 @requires_ds(tipsy_gal)
 def test_tipsy_galaxy():
     for test in sph_answer(tipsy_gal, 'galaxy.00300', 315372, tg_fields):
+        test_tipsy_galaxy.__name__ = test.description
         yield test
 
 @requires_file(gasoline_dmonly)

diff -r 6824ad32014e5813f6c8ac3882ba88189ed2753d -r 2f95674671178a4868f4f6aeff56b041127d189e yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -826,18 +826,21 @@
     if ds_kwargs is None:
         ds_kwargs = {}
     ds = data_dir_load(ds_fn, kwargs=ds_kwargs)
-    yield assert_equal, str(ds), ds_str_repr
+    yield AssertWrapper("%s_string_representation" % str(ds), assert_equal,
+                        str(ds), ds_str_repr)
     dso = [None, ("sphere", ("c", (0.1, 'unitary')))]
     dd = ds.all_data()
-    yield assert_equal, dd["particle_position"].shape, (ds_nparticles, 3)
+    yield AssertWrapper("%s_all_data_part_shape" % str(ds), assert_equal,
+                        dd["particle_position"].shape, (ds_nparticles, 3))
     tot = sum(dd[ptype, "particle_position"].shape[0]
               for ptype in ds.particle_types if ptype != "all")
-    yield assert_equal, tot, ds_nparticles
+    yield AssertWrapper("%s_all_data_part_total" % str(ds), assert_equal,
+                        tot, ds_nparticles)
     for dobj_name in dso:
         dobj = create_obj(ds, dobj_name)
         s1 = dobj["ones"].sum()
         s2 = sum(mask.sum() for block, mask in dobj.blocks)
-        yield assert_equal, s1, s2
+        yield AssertWrapper("%s_mask_test" % str(ds), assert_equal, s1, s2)
         for field, weight_field in fields.items():
             if field[0] in ds.particle_types:
                 particle_type = True
@@ -850,7 +853,6 @@
                         dobj_name)
             yield FieldValuesTest(ds_fn, field, dobj_name,
                                   particle_type=particle_type)
-    return
 
 def create_obj(ds, obj_type):
     # obj_type should be tuple of

Repository URL: https://bitbucket.org/yt_analysis/yt/

--

This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.



More information about the yt-svn mailing list