Skip to content

Commit d5cd4da

Browse files
toracleolegpidsadnyi
authored andcommitted
fix incomparable tuple
1 parent bfefabe commit d5cd4da

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pytest_bdd/plugin.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,8 @@ def item_key(item):
103103
declaration_order = getattr(item.function, "__pytest_bdd_counter__", 0)
104104
else:
105105
declaration_order = 0
106-
return (item.reportinfo()[:2], declaration_order)
106+
func, linenum = item.reportinfo()[:2]
107+
info = (func, linenum) if linenum is not None else (func, -1)
108+
return (info, declaration_order)
107109

108110
items.sort(key=item_key)

0 commit comments

Comments
 (0)