diff options
author | José Fonseca <jfonseca@vmware.com> | 2009-03-30 17:51:55 +0100 |
---|---|---|
committer | José Fonseca <jfonseca@vmware.com> | 2009-03-30 17:51:55 +0100 |
commit | a8251d041ac323712a00d5fed3e51fa5ad7bc987 (patch) | |
tree | 1f09b6fd2589b3f896601de0c15c47fe96380c6c /src/gallium/state_trackers/python/tests/texture.py | |
parent | af25470a5430c68e157489ff095baa5d548d8783 (diff) | |
download | external_mesa3d-a8251d041ac323712a00d5fed3e51fa5ad7bc987.zip external_mesa3d-a8251d041ac323712a00d5fed3e51fa5ad7bc987.tar.gz external_mesa3d-a8251d041ac323712a00d5fed3e51fa5ad7bc987.tar.bz2 |
python/test: Move the image comparison logic to the base test class.
Diffstat (limited to 'src/gallium/state_trackers/python/tests/texture.py')
-rw-r--r-- | src/gallium/state_trackers/python/tests/texture.py | 18 |
1 files changed, 1 insertions, 17 deletions
diff --git a/src/gallium/state_trackers/python/tests/texture.py b/src/gallium/state_trackers/python/tests/texture.py index bd95f73..58b7e1c 100644 --- a/src/gallium/state_trackers/python/tests/texture.py +++ b/src/gallium/state_trackers/python/tests/texture.py @@ -27,7 +27,6 @@ ########################################################################## -import sys from gallium import * from base import * @@ -291,22 +290,7 @@ class TextureTest(TestCase): cbuf = cbuf_tex.get_surface() - total = h*w - different = cbuf.compare_tile_rgba(x, y, w, h, expected_rgba, tol=4.0/256) - if different: - sys.stderr.write("%u out of %u pixels differ\n" % (different, total)) - - if float(total - different)/float(total) < 0.85: - - if 0: - rgba = FloatArray(h*w*4) - cbuf.get_tile_rgba(x, y, w, h, rgba) - show_image(w, h, Result=rgba, Expected=expected_rgba) - save_image(w, h, rgba, "result.png") - save_image(w, h, expected_rgba, "expected.png") - #sys.exit(0) - - raise TestFailure + self.assert_rgba(cbuf, x, y, w, h, expected_rgba, 4.0/256, 0.85) del ctx |