parameters: (self)
docstring: Also tests asRGB8.
docstring_summary: Also tests asRGB8.
docstring_tokens: Also tests asRGB8 .
function: def testL2(self):
          "Also tests asRGB8."
          w = Writer(1, 4, greyscale=True, bitdepth=2)
          f = BytesIO()
          w.write_array(f, array('B', range(4)))
          r = Reader(bytes=f.getvalue())
          x,y,pixels,meta = r.asRGB8()
          self.assertEqual(x, 1)
          self.assertEqual(y, 4)
          for i,row in enumerate(pixels):
              self.assertEqual(len(row), 3)
              self.assertEqual(list(row), [0x55*i]*3)
function_tokens: def testL2 ( self ) : w = Writer ( 1 , 4 , greyscale = True , bitdepth = 2 ) f = BytesIO ( ) w . write_array ( f , array ( 'B' , range ( 4 ) ) ) r = Reader ( bytes = f . getvalue ( ) ) x , y , pixels , meta = r . asRGB8 ( ) self . assertEqual ( x , 1 ) self . assertEqual ( y , 4 ) for i , row in enumerate ( pixels ) : self . assertEqual ( len ( row ) , 3 ) self . assertEqual ( list ( row ) , [ 0x55 * i ] * 3 )