urbansim
urbansim copied to clipboard
Compute max-profit over all forms if "form" is None
This was a bug: If the argument "form" is None, the max profit should be computed over all forms.
When calling the function with form=None, the original code failed at the line df = df[df.max_profit_far > 0], since df.max_profit_far does not exist.
Coverage increased (+0.04%) to 94.335% when pulling d563ce73dc0f7ed4ee22f1569d1fc559ed57483b on hanase:max-profit-fix into d9a058bf24c03b1a03ea8a09527de28b1ed4736f on UDST:master.
Good Catch! Maybe we should add a test to keep this from breaking again?