@requires_application()
def test_sys_info():
 fname = op.join(temp_dir, 'info.txt')
 sys_info(fname)
 assert_raises(IOError, sys_info, fname)
 with open(fname, 'r') as fid:
  out = ''.join(fid.readlines())
 keys = ['GL version', 'Python', 'Backend', 'pyglet', 'Platform:']
 for key in keys:
  assert_in(key, out)
 print out
 assert_true(('Info-gathering error' not in out))

@ requires_application ( ) def test_sys_info ( ) : fname = op . join ( temp_dir , 'info.txt' ) sys_info ( fname ) assert_raises ( IOError , sys_info , fname ) with open ( fname , 'r' ) as fid : out = '' . join ( fid . readlines ( ) ) keys = [ 'GL version' , 'Python' , 'Backend' , 'pyglet' , 'Platform:' ] for key in keys : assert_in ( key , out ) print out assert_true ( ( 'Info-gathering error' not in out ) )
test info-showing utility .