Skip to content

Commit 232c506

Browse files
author
Scott Sanderson
committed
BUG: Sort by repr in assertion message.
Pipeline column objects override __lt__ to raise an error, which means using the default sorted() implementation doesn't work.
1 parent d453cc9 commit 232c506

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

zipline/pipeline/engine.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -695,7 +695,10 @@ def loader_group_key(term):
695695
assert set(loaded) == set(to_load), (
696696
'loader did not return an AdjustedArray for each column\n'
697697
'expected: %r\n'
698-
'got: %r' % (sorted(to_load), sorted(loaded))
698+
'got: %r' % (
699+
sorted(to_load, key=repr),
700+
sorted(loaded, key=repr),
701+
)
699702
)
700703
workspace.update(loaded)
701704
else:

0 commit comments

Comments
 (0)