[yt-svn] commit/yt: xarthisius: Give meaningful names to answer tests
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Oct 2 06:22:57 PDT 2013
1 new commit in yt:
https://bitbucket.org/yt_analysis/yt/commits/824ba0b66e92/
Changeset: 824ba0b66e92
Branch: yt
User: xarthisius
Date: 2013-10-02 15:15:39
Summary: Give meaningful names to answer tests
Affected #: 6 files
diff -r f393c060da9bdc22d6e28937ba87c8d8347b6dfc -r 824ba0b66e9229d070e9323032301e061e57a916 yt/analysis_modules/sunyaev_zeldovich/tests/test_projection.py
--- a/yt/analysis_modules/sunyaev_zeldovich/tests/test_projection.py
+++ b/yt/analysis_modules/sunyaev_zeldovich/tests/test_projection.py
@@ -29,11 +29,11 @@
mue = 1./0.88
freqs = np.array([30., 90., 240.])
-
+
def setup():
"""Test specific setup."""
from yt.config import ytcfg
- ytcfg["yt", "__withintesting"] = "True"
+ ytcfg["yt", "__withintesting"] = "True"
def full_szpack3d(pf, xo):
data = pf.h.grids[0]
@@ -43,7 +43,7 @@
Dtau = sigma_thompson*data["Density"]/(mh*mue)*dz
Te = data["Temperature"]/K_per_keV
betac = data["z-velocity"]/clight
- pbar = get_pbar("Computing 3-D cell-by-cell S-Z signal for comparison.", nx)
+ pbar = get_pbar("Computing 3-D cell-by-cell S-Z signal for comparison.", nx)
for i in xrange(nx):
pbar.update(i)
for j in xrange(ny):
@@ -67,7 +67,7 @@
a = 200.
v0 = 300.*cm_per_km
ddims = (nx,ny,nz)
-
+
x, y, z = np.mgrid[-R:R:nx*1j,
-R:R:ny*1j,
-R:R:nz*1j]
@@ -87,7 +87,7 @@
data["z-velocity"] = velz
bbox = np.array([[-0.5,0.5],[-0.5,0.5],[-0.5,0.5]])
-
+
L = 2*R*cm_per_kpc
dl = L/nz
@@ -118,9 +118,11 @@
return szprj.data
def onaxis_image_func(filename_prefix):
szprj.write_png(filename_prefix)
- yield GenericArrayTest(pf, onaxis_array_func)
- yield GenericImageTest(pf, onaxis_image_func, 3)
-
+ for test in [GenericArrayTest(pf, onaxis_array_func),
+ GenericImageTest(pf, onaxis_image_func, 3)]:
+ test_M7_onaxis.__name__ = test.description
+ yield test
+
@requires_module("SZpack")
@requires_pf(M7)
def test_M7_offaxis():
@@ -131,5 +133,7 @@
return szprj.data
def offaxis_image_func(filename_prefix):
szprj.write_png(filename_prefix)
- yield GenericArrayTest(pf, offaxis_array_func)
- yield GenericImageTest(pf, offaxis_image_func, 3)
+ for test in [GenericArrayTest(pf, offaxis_array_func),
+ GenericImageTest(pf, offaxis_image_func, 3)]:
+ test_M7_offaxis.__name__ = test.description
+ yield test
diff -r f393c060da9bdc22d6e28937ba87c8d8347b6dfc -r 824ba0b66e9229d070e9323032301e061e57a916 yt/frontends/chombo/tests/test_outputs.py
--- a/yt/frontends/chombo/tests/test_outputs.py
+++ b/yt/frontends/chombo/tests/test_outputs.py
@@ -29,6 +29,7 @@
pf = data_dir_load(gc)
yield assert_equal, str(pf), "data.0077.3d.hdf5"
for test in small_patch_amr(gc, _fields):
+ test_gc.__name__ = test.description
yield test
tb = "TurbBoxLowRes/data.0005.3d.hdf5"
@@ -37,4 +38,5 @@
pf = data_dir_load(tb)
yield assert_equal, str(pf), "data.0005.3d.hdf5"
for test in small_patch_amr(tb, _fields):
+ test_tb.__name__ = test.description
yield test
diff -r f393c060da9bdc22d6e28937ba87c8d8347b6dfc -r 824ba0b66e9229d070e9323032301e061e57a916 yt/frontends/enzo/tests/test_outputs.py
--- a/yt/frontends/enzo/tests/test_outputs.py
+++ b/yt/frontends/enzo/tests/test_outputs.py
@@ -30,6 +30,7 @@
pf = data_dir_load(m7)
yield assert_equal, str(pf), "moving7_0010"
for test in small_patch_amr(m7, _fields):
+ test_moving7.__name__ = test.description
yield test
g30 = "IsolatedGalaxy/galaxy0030/galaxy0030"
@@ -38,4 +39,5 @@
pf = data_dir_load(g30)
yield assert_equal, str(pf), "galaxy0030"
for test in big_patch_amr(g30, _fields):
+ test_galaxy0030.__name__ = test.description
yield test
diff -r f393c060da9bdc22d6e28937ba87c8d8347b6dfc -r 824ba0b66e9229d070e9323032301e061e57a916 yt/frontends/flash/tests/test_outputs.py
--- a/yt/frontends/flash/tests/test_outputs.py
+++ b/yt/frontends/flash/tests/test_outputs.py
@@ -29,6 +29,7 @@
pf = data_dir_load(sloshing)
yield assert_equal, str(pf), "sloshing_low_res_hdf5_plt_cnt_0300"
for test in small_patch_amr(sloshing, _fields):
+ test_sloshing.__name__ = test.description
yield test
_fields_2d = ("Temperature", "Density")
@@ -39,4 +40,5 @@
pf = data_dir_load(wt)
yield assert_equal, str(pf), "windtunnel_4lev_hdf5_plt_cnt_0030"
for test in small_patch_amr(wt, _fields_2d):
+ test_wind_tunnel.__name__ = test.description
yield test
diff -r f393c060da9bdc22d6e28937ba87c8d8347b6dfc -r 824ba0b66e9229d070e9323032301e061e57a916 yt/frontends/orion/tests/test_outputs.py
--- a/yt/frontends/orion/tests/test_outputs.py
+++ b/yt/frontends/orion/tests/test_outputs.py
@@ -29,6 +29,7 @@
pf = data_dir_load(radadvect)
yield assert_equal, str(pf), "plt00000"
for test in small_patch_amr(radadvect, _fields):
+ test_radadvect.__name__ = test.description
yield test
rt = "RadTube/plt00500"
@@ -37,4 +38,5 @@
pf = data_dir_load(rt)
yield assert_equal, str(pf), "plt00500"
for test in small_patch_amr(rt, _fields):
+ test_radtube.__name__ = test.description
yield test
diff -r f393c060da9bdc22d6e28937ba87c8d8347b6dfc -r 824ba0b66e9229d070e9323032301e061e57a916 yt/visualization/tests/test_plotwindow.py
--- a/yt/visualization/tests/test_plotwindow.py
+++ b/yt/visualization/tests/test_plotwindow.py
@@ -94,8 +94,10 @@
for ax in 'xyz':
for attr_name in ATTR_ARGS.keys():
for args in ATTR_ARGS[attr_name]:
- yield PlotWindowAttributeTest(pf, plot_field, ax, attr_name,
- args, decimals)
+ test = PlotWindowAttributeTest(pf, plot_field, ax, attr_name,
+ args, decimals)
+ test_attributes.__name__ = test.description
+ yield test
@requires_pf(WT)
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