add a test for byteswap()
This commit is contained in:
parent
e9720afb18
commit
e83a3bbfd1
2
TODO
2
TODO
@ -1,5 +1,3 @@
|
|||||||
- add tests for bandfold/unfold, byteswap
|
|
||||||
|
|
||||||
|
|
||||||
- how about something like vips_grid() which turns a tall thin one-band
|
- how about something like vips_grid() which turns a tall thin one-band
|
||||||
image into a much smaller many-band image?
|
image into a much smaller many-band image?
|
||||||
|
@ -237,6 +237,14 @@ class TestConversion(unittest.TestCase):
|
|||||||
self.assertEqual(y.bands, 1)
|
self.assertEqual(y.bands, 1)
|
||||||
self.assertEqual(x.avg(), y.avg())
|
self.assertEqual(x.avg(), y.avg())
|
||||||
|
|
||||||
|
def test_byteswap(self):
|
||||||
|
x = self.mono.cast("ushort")
|
||||||
|
y = x.byteswap().byteswap()
|
||||||
|
self.assertEqual(x.width, y.width)
|
||||||
|
self.assertEqual(x.height, y.height)
|
||||||
|
self.assertEqual(x.bands, y.bands)
|
||||||
|
self.assertEqual(x.avg(), y.avg())
|
||||||
|
|
||||||
def test_embed(self):
|
def test_embed(self):
|
||||||
for fmt in all_formats:
|
for fmt in all_formats:
|
||||||
test = self.colour.cast(fmt)
|
test = self.colour.cast(fmt)
|
||||||
|
Loading…
Reference in New Issue
Block a user