Files
catalyst/tests
Jonathan Kamens d833503e50 BUG: Use context in lieu of "use_environment" decorator
The "use_environment" decorator is too side-effectful (e.g.,
connecting to Yahoo! Finance or another data source) to be used as a
decorator to a function that gets evaluated during module load. This
causes problems, e.g., if Zipline is being used in a gevent
environment, when the trading environment created by the decorator
argument tries to use greenlets when gevent hasn't been fully
initialized.

Since the decorator is nothing more than a context-manager wrapper,
this commit removes the decorator and replaces its use with contexts,
i.e., "with" statements.
2013-06-24 17:13:14 -04:00
..
2012-05-09 13:34:13 -04:00