Skip to content

Commit

Permalink
Added comment to explain sorting rdfa in tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Cristi Constantin committed Jul 16, 2019
1 parent 3aaebd5 commit fdb5a4a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions tests/test_extruct.py
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ def test_all(self):
body = get_testdata('songkick', 'elysianfields.html')
expected = json.loads(get_testdata('songkick', 'elysianfields.json').decode('UTF-8'))
data = extruct.extract(body, base_url='http://www.songkick.com/artists/236156-elysian-fields')
# Sorting the values here because RDFa is not preserving ordering on duplicated properties.
# See https://github.com/scrapinghub/extruct/issues/116
# Also see test_rdfa_not_preserving_order()
for rdf in data['rdfa']:
for key, pairs in rdf.items():
if ':' in key and isinstance(pairs, list):
Expand Down

0 comments on commit fdb5a4a

Please sign in to comment.