@skip('silverlight')
def test_file_multiple_reads():
 l = []
 for i in xrange(10):
  l.append(marshal.dumps({i: i}))
 data = ''.join(l)
 f = file('tempfile.txt', 'w')
 f.write(data)
 f.close()
 f = file('tempfile.txt')
 for i in xrange(10):
  obj = marshal.load(f)
  AreEqual(obj, {i: i})
 f.close()
 delete_files('tempfile.txt')

@ skip ( 'silverlight' ) def test_file_multiple_reads ( ) : l = [ ] for i in xrange ( 10 ) : l . append ( marshal . dumps ( { i : i } ) ) data = '' . join ( l ) f = file ( 'tempfile.txt' , 'w' ) f . write ( data ) f . close ( ) f = file ( 'tempfile.txt' ) for i in xrange ( 10 ) : obj = marshal . load ( f ) AreEqual ( obj , { i : i } ) f . close ( ) delete_files ( 'tempfile.txt' )
calling load w/ a file should only advance the length of the file .