[yt-svn] commit/yt: 5 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Mon Oct 5 11:32:56 PDT 2015
5 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/ae0c0ed6dbcf/
Changeset: ae0c0ed6dbcf
Branch: yt
User: xarthisius
Date: 2015-09-25 17:26:55+00:00
Summary: Give meaningful names to answer tests
Affected #: 3 files
diff -r b7afd79a9820e8605a1e73c5d3d7a077cae7fe96 -r ae0c0ed6dbcf9d594a5e5e55718eec3fbbc74a08 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 b7afd79a9820e8605a1e73c5d3d7a077cae7fe96 -r ae0c0ed6dbcf9d594a5e5e55718eec3fbbc74a08 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 b7afd79a9820e8605a1e73c5d3d7a077cae7fe96 -r ae0c0ed6dbcf9d594a5e5e55718eec3fbbc74a08 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)
https://bitbucket.org/yt_analysis/yt/commits/a2bb02ecf1b2/
Changeset: a2bb02ecf1b2
Branch: yt
User: xarthisius
Date: 2015-09-25 18:25:24+00:00
Summary: Remove return statement from sph_answers
Affected #: 1 file
diff -r ae0c0ed6dbcf9d594a5e5e55718eec3fbbc74a08 -r a2bb02ecf1b269424f8bcd57712d70a305e8154c yt/utilities/answer_testing/framework.py
--- a/yt/utilities/answer_testing/framework.py
+++ b/yt/utilities/answer_testing/framework.py
@@ -850,7 +850,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
https://bitbucket.org/yt_analysis/yt/commits/2f2303fc3a4f/
Changeset: 2f2303fc3a4f
Branch: yt
User: xarthisius
Date: 2015-09-25 18:46:09+00:00
Summary: Handle tuple test yields
Affected #: 3 files
diff -r a2bb02ecf1b269424f8bcd57712d70a305e8154c -r 2f2303fc3a4fd89f1d2fd9abe7f19e01917c250d yt/frontends/gadget/tests/test_outputs.py
--- a/yt/frontends/gadget/tests/test_outputs.py
+++ b/yt/frontends/gadget/tests/test_outputs.py
@@ -60,12 +60,18 @@
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
+ if isinstance(test, tuple):
+ test_iso_collapse.__name__ = test[0].description
+ else:
+ 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
+ if isinstance(test, tuple):
+ test_gadget_disk_galaxy.__name__ = test[0].description
+ else:
+ test_gadget_disk_galaxy.__name__ = test.description
yield test
diff -r a2bb02ecf1b269424f8bcd57712d70a305e8154c -r 2f2303fc3a4fd89f1d2fd9abe7f19e01917c250d yt/frontends/owls/tests/test_outputs.py
--- a/yt/frontends/owls/tests/test_outputs.py
+++ b/yt/frontends/owls/tests/test_outputs.py
@@ -46,7 +46,10 @@
@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
+ if isinstance(test, tuple):
+ test_snapshot_033.__name__ = test[0].description
+ else:
+ test_snapshot_033.__name__ = test.description
yield test
diff -r a2bb02ecf1b269424f8bcd57712d70a305e8154c -r 2f2303fc3a4fd89f1d2fd9abe7f19e01917c250d yt/frontends/tipsy/tests/test_outputs.py
--- a/yt/frontends/tipsy/tests/test_outputs.py
+++ b/yt/frontends/tipsy/tests/test_outputs.py
@@ -111,7 +111,10 @@
@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
+ if isinstance(test, tuple):
+ test_tipsy_galaxy.__name__ = test[0].description
+ else:
+ test_tipsy_galaxy.__name__ = test.description
yield test
@requires_file(gasoline_dmonly)
https://bitbucket.org/yt_analysis/yt/commits/7940d0ca1f3f/
Changeset: 7940d0ca1f3f
Branch: yt
User: xarthisius
Date: 2015-10-02 15:03:49+00:00
Summary: Wrap numpy's asserts with AssertWrapper to give them description
Affected #: 4 files
diff -r 2f2303fc3a4fd89f1d2fd9abe7f19e01917c250d -r 7940d0ca1f3fd54454047b293d4c19e3401b308f yt/frontends/gadget/tests/test_outputs.py
--- a/yt/frontends/gadget/tests/test_outputs.py
+++ b/yt/frontends/gadget/tests/test_outputs.py
@@ -60,18 +60,12 @@
def test_iso_collapse():
for test in sph_answer(isothermal_h5, 'snap_505', 2**17,
iso_fields, ds_kwargs=iso_kwargs):
- if isinstance(test, tuple):
- test_iso_collapse.__name__ = test[0].description
- else:
- test_iso_collapse.__name__ = test.description
+ 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):
- if isinstance(test, tuple):
- test_gadget_disk_galaxy.__name__ = test[0].description
- else:
- test_gadget_disk_galaxy.__name__ = test.description
+ test_gadget_disk_galaxy.__name__ = test.description
yield test
diff -r 2f2303fc3a4fd89f1d2fd9abe7f19e01917c250d -r 7940d0ca1f3fd54454047b293d4c19e3401b308f yt/frontends/owls/tests/test_outputs.py
--- a/yt/frontends/owls/tests/test_outputs.py
+++ b/yt/frontends/owls/tests/test_outputs.py
@@ -46,10 +46,7 @@
@requires_ds(os33, big_data=True)
def test_snapshot_033():
for test in sph_answer(os33, 'snap_033', 2*128**3, _fields):
- if isinstance(test, tuple):
- test_snapshot_033.__name__ = test[0].description
- else:
- test_snapshot_033.__name__ = test.description
+ test_snapshot_033.__name__ = test.description
yield test
diff -r 2f2303fc3a4fd89f1d2fd9abe7f19e01917c250d -r 7940d0ca1f3fd54454047b293d4c19e3401b308f yt/frontends/tipsy/tests/test_outputs.py
--- a/yt/frontends/tipsy/tests/test_outputs.py
+++ b/yt/frontends/tipsy/tests/test_outputs.py
@@ -111,10 +111,7 @@
@requires_ds(tipsy_gal)
def test_tipsy_galaxy():
for test in sph_answer(tipsy_gal, 'galaxy.00300', 315372, tg_fields):
- if isinstance(test, tuple):
- test_tipsy_galaxy.__name__ = test[0].description
- else:
- test_tipsy_galaxy.__name__ = test.description
+ test_tipsy_galaxy.__name__ = test.description
yield test
@requires_file(gasoline_dmonly)
diff -r 2f2303fc3a4fd89f1d2fd9abe7f19e01917c250d -r 7940d0ca1f3fd54454047b293d4c19e3401b308f 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
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