quantopian/zipline — pull request #339 by ssanderson (2014-05-28 22:40:25+00:00)
Title: ENH: Filter out empty lists from `get_open_orders`.

Filter out empty lists from `get_open_orders` so that we have consistent
behavior between the case where a user has never placed an order and the case
where the user has placed an order but it has been executed or cancelled.

A nice side-effect, which was the impetus for this change, is that you can
check if you have any open orders by doing:

```
len(get_open_orders()) == 0
```

Also adds a test for the behavior of `get_open_orders`, which was previously
lacking.