Task #5605 (closed)
Opened 8 years ago
Closed 8 years ago
BUG: TestThumbs integration test failing
| Reported by: | wmoore | Owned by: | wmoore |
|---|---|---|---|
| Priority: | minor | Milestone: | OMERO-Beta4.3 |
| Component: | OmeroPy | Version: | n.a. |
| Keywords: | n.a. | Cc: | jamoore, cxallan |
| Resources: | n.a. | Referenced By: | n.a. |
| References: | n.a. | Remaining Time: | 0.0d |
| Sprint: | 2011-06-16 (14) |
Description (last modified by jmoore)
Seems that these tests are failing because they expect a non-square thumbnail, but we always get a square thumbnail because the big test image is square?
E.g. when you ask for a thumbnail that is x: 64 y: 60 you get one that is 64 x 64. Shouldn't this give you a 60 x 60 thumbnail?
Tests can be fixed like this: you want me to commit this Josh?
make_test_single("getThumbnailByLongestSide", 64, 64, rint(64))
make_test_single("getThumbnailDirect", 64, 64, rint(64), rint(64))
make_test_single("getThumbnailForSectionDirect", 64, 64, 0, 0, rint(64), rint(64))
-make_test_single("getThumbnail", 64, 60, rint(64), rint(60))
+make_test_single("getThumbnail", 64, 64, rint(64), rint(60))
make_test_single("getThumbnailByLongestSide", 60, 60, rint(60))
-make_test_single("getThumbnailDirect", 64, 60, rint(64), rint(60))
-make_test_single("getThumbnailForSectionDirect", 64, 60, 0, 0, rint(64), rint(60))
+make_test_single("getThumbnailDirect", 64, 64, rint(64), rint(60))
+make_test_single("getThumbnailForSectionDirect", 64, 64, 0, 0, rint(64), rint(60))
make_test_set("getThumbnailSet", 64, 64, rint(64), rint(64))
make_test_set("getThumbnailByLongestSideSet", 64, 64, rint(64))
======================================================================
FAIL [16.752s]: testGetThumbnailDirectx64x60 (integration.thumbs.TestThumbs)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/will/Desktop/OMERO/components/tools/OmeroPy/test/integration/thumbs.py", line 97, in f
self.assertTb(buf, x, y)
File "/Users/will/Desktop/OMERO/components/tools/OmeroPy/test/integration/thumbs.py", line 31, in assertTb
self.assertEquals(unwrap(y), thumb.size[1])
AssertionError: 60 != 64
======================================================================
FAIL [16.752s]: testGetThumbnailForSectionDirectx0x0x64x60 (integration.thumbs.TestThumbs)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/will/Desktop/OMERO/components/tools/OmeroPy/test/integration/thumbs.py", line 97, in f
self.assertTb(buf, x, y)
File "/Users/will/Desktop/OMERO/components/tools/OmeroPy/test/integration/thumbs.py", line 31, in assertTb
self.assertEquals(unwrap(y), thumb.size[1])
AssertionError: 60 != 64
======================================================================
FAIL [16.752s]: testGetThumbnailx64x60 (integration.thumbs.TestThumbs
)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/Users/will/Desktop/OMERO/components/tools/OmeroPy/test/integration/thumbs.py", line 97, in f
self.assertTb(buf, x, y)
File "/Users/will/Desktop/OMERO/components/tools/OmeroPy/test/integration/thumbs.py", line 31, in assertTb
self.assertEquals(unwrap(y), thumb.size[1])
AssertionError: 60 != 64
----------------------------------------------------------------------
Change History (3)
comment:1 Changed 8 years ago by jmoore
- Cc cxallan added
- Description modified (diff)
comment:2 Changed 8 years ago by jburel
- Sprint changed from 2011-06-02 (13) to 2011-06-16 (14)
Moved from sprint 2011-06-02 (13)
comment:3 Changed 8 years ago by Will Moore <will@…>
- Remaining Time set to 0
- Resolution set to fixed
- Status changed from new to closed
(In [cd851722e91af56609f8e155dfc1f085592cfb66/ome.git] on branch develop) Fixing integration test thumbs.py to expect square thumbnails. Closes #5605
Most important is to confirm with Chris what the API should be returning (and unify any documentation if its amiss). Otherwise, I'm fine with the changes.