parameters: (self)
docstring: Test that the command line tool can read PGM files.
docstring_summary: Test that the command line tool can read PGM files.
docstring_tokens: Test that the command line tool can read PGM files .
function: def testPGMin(self):
          """Test that the command line tool can read PGM files."""
          def do():
              return _main(['testPGMin'])
          s = BytesIO()
          s.write(strtobytes('P5 2 2 3\n'))
          s.write(strtobytes('\x00\x01\x02\x03'))
          s.flush()
          s.seek(0)
          o = BytesIO()
          testWithIO(s, o, do)
          r = Reader(bytes=o.getvalue())
          x,y,pixels,meta = r.read()
          self.assertTrue(r.greyscale)
          self.assertEqual(r.bitdepth, 2)
function_tokens: def testPGMin ( self ) : def do ( ) : return _main ( [ 'testPGMin' ] ) s = BytesIO ( ) s . write ( strtobytes ( 'P5 2 2 3\n' ) ) s . write ( strtobytes ( '\x00\x01\x02\x03' ) ) s . flush ( ) s . seek ( 0 ) o = BytesIO ( ) testWithIO ( s , o , do ) r = Reader ( bytes = o . getvalue ( ) ) x , y , pixels , meta = r . read ( ) self . assertTrue ( r . greyscale ) self . assertEqual ( r . bitdepth , 2 )