Skip to content

Commit 843b2e6

Browse files
author
Cristi Constantin
committed
Added comment to explain sorting rdfa in tests
1 parent 3aaebd5 commit 843b2e6

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/test_extruct.py

+2
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ def test_all(self):
1616
body = get_testdata('songkick', 'elysianfields.html')
1717
expected = json.loads(get_testdata('songkick', 'elysianfields.json').decode('UTF-8'))
1818
data = extruct.extract(body, base_url='http://www.songkick.com/artists/236156-elysian-fields')
19+
# Sorting the values here because RDFa is not preserving ordering on duplicated properties.
20+
# See https://github.com/scrapinghub/extruct/issues/116
1921
for rdf in data['rdfa']:
2022
for key, pairs in rdf.items():
2123
if ':' in key and isinstance(pairs, list):

0 commit comments

Comments
 (0)