File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1+ <!doctype html>
2+ < html >
3+ <!-- shamelessly stolen from http://schema.org/Person -->
4+ < head >
5+ < title > skip level</ title >
6+ </ head >
7+
8+ < body >
9+ < div itemid ="http://www.xyz.edu/~jane " itemscope itemtype ="http://schema.org/Person ">
10+ < p >
11+ < span itemprop ="name "> Jane Doe</ span >
12+ </ p >
13+ </ div >
14+ </ body >
15+ </ html >
Original file line number Diff line number Diff line change @@ -103,7 +103,13 @@ def test_parse_unlinked(self):
103103 i = items [1 ]
104104 self .assertEqual (i .itemtype , [URI ("http://schema.org/PostalAddress" )])
105105 self .assertTrue ('Whitworth' in i .streetAddress )
106-
106+
107+ def test_skip_level (self ):
108+ items = get_items (open ("test-data/skip-level.html" ))
109+ self .assertEqual (len (items ), 1 )
110+ self .assertEqual (items [0 ].name , "Jane Doe" )
111+
112+
107113
108114if __name__ == "__main__" :
109115 unittest .main ()
You can’t perform that action at this time.
0 commit comments