#NEWLINE# def test_skipping( ) : #NEWLINE# #INDENT# f = io . StringIO ( SAMPLE_XML ) #NEWLINE# dump = Iterator . from_file ( f ) #NEWLINE# page = next ( dump ) #NEWLINE# eq_ ( page . title , 'Foo' ) #NEWLINE# eq_ ( page . namespace , 0 ) #NEWLINE# eq_ ( page . id , 1 ) #NEWLINE# page = next ( dump ) #NEWLINE# eq_ ( page . title , 'Bar' ) #NEWLINE# eq_ ( page . namespace , 1 ) #NEWLINE# eq_ ( page . id , 2 ) #NEWLINE# revision = next ( page ) #NEWLINE# eq_ ( f . id , 3 ) #NEWLINE# eq_ ( revision . timestamp , Timestamp ( '2004-08-11T09:04:08Z' ) ) #NEWLINE# eq_ ( revision . contributor . id , None ) #NEWLINE# eq_ ( revision . contributor . user_text , '222.152.210.22' ) #NEWLINE# assert_is_instance ( revision . text , Text ) #NEWLINE# eq_ ( revision . text , 'Revision 3 text' ) #NEWLINE# eq_ ( revision . sha1 , 'g9chqqg94myzq11c56ixvq7o1yg75n9' ) #NEWLINE# eq_ ( revision . comment , None ) #NEWLINE# eq_ ( revision . model , 'wikitext' ) #NEWLINE# eq_ ( revision . format , 'text/x-wiki' )