[yt-svn] commit/yt: 3 new changesets
commits-noreply at bitbucket.org
commits-noreply at bitbucket.org
Wed Feb 17 15:30:43 PST 2016
3 new commits in yt:
https://bitbucket.org/yt_analysis/yt/commits/115dc45767ba/
Changeset: 115dc45767ba
Branch: yt
User: ngoldbaum
Date: 2016-02-17 19:51:09+00:00
Summary: Use a width that includes the whole domain in vr orientation tests
Affected #: 1 file
diff -r 28196e94219e1203f78a3ba94272d49e79deaee4 -r 115dc45767ba6af71444909c50fb807d31231925 yt/visualization/volume_rendering/tests/test_vr_orientation.py
--- a/yt/visualization/volume_rendering/tests/test_vr_orientation.py
+++ b/yt/visualization/volume_rendering/tests/test_vr_orientation.py
@@ -158,7 +158,7 @@
[0.5, 0.4, 0.7],
[-0.3, -0.1, 0.8] ]
center = [0.5, 0.5, 0.5]
- width = [0.04, 0.04, 0.4]
+ width = [1.0, 1.0, 1.0]
for orientation in orientations:
image = off_axis_projection(ds, center, orientation, width,
512, "density", no_ghost=False)
https://bitbucket.org/yt_analysis/yt/commits/96e73539c7c8/
Changeset: 96e73539c7c8
Branch: yt
User: ngoldbaum
Date: 2016-02-17 22:53:22+00:00
Summary: Give answer test instances explicit names
Affected #: 1 file
diff -r 115dc45767ba6af71444909c50fb807d31231925 -r 96e73539c7c8b8207631cd9eadaf35db7b8fd06f yt/visualization/volume_rendering/tests/test_vr_orientation.py
--- a/yt/visualization/volume_rendering/tests/test_vr_orientation.py
+++ b/yt/visualization/volume_rendering/tests/test_vr_orientation.py
@@ -159,9 +159,14 @@
[-0.3, -0.1, 0.8] ]
center = [0.5, 0.5, 0.5]
width = [1.0, 1.0, 1.0]
- for orientation in orientations:
+
+ for i, orientation in enumerate(orientations):
image = off_axis_projection(ds, center, orientation, width,
512, "density", no_ghost=False)
+
def offaxis_image_func(filename_prefix):
return image.write_image(filename_prefix)
- yield GenericImageTest(ds, offaxis_image_func, decimals)
+
+ test = GenericImageTest(ds, offaxis_image_func, decimals)
+ test.prefix = "oap_orientation_{}".format(i)
+ yield test
https://bitbucket.org/yt_analysis/yt/commits/557a8e63df72/
Changeset: 557a8e63df72
Branch: yt
User: ngoldbaum
Date: 2016-02-17 22:55:31+00:00
Summary: Document the use of answer test name prefix in the docs on this
Affected #: 1 file
diff -r 96e73539c7c8b8207631cd9eadaf35db7b8fd06f -r 557a8e63df7255cb6d02652a8f53d483a78659ed doc/source/developing/testing.rst
--- a/doc/source/developing/testing.rst
+++ b/doc/source/developing/testing.rst
@@ -453,12 +453,19 @@
@requires_ds(my_ds)
def test_my_ds():
ds = data_dir_load(my_ds)
+
def create_image(filename_prefix):
plt.plot([1, 2], [1, 2])
plt.savefig(filename_prefix)
test = GenericImageTest(ds, create_image, 12)
+
+ # this ensures the test has a unique key in the
+ # answer test storage file
+ test.prefix = "my_unique_name"
+
# this ensures a nice test name in nose's output
test_my_ds.__description__ = test.description
+
yield test_my_ds
Another good example of an image comparison test is the
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