(self)
| 706 | bt.plot(filename=f, open_browser=False) |
| 707 | |
| 708 | def test_range_axis(self): |
| 709 | df = GOOG.iloc[:100].reset_index(drop=True) |
| 710 | |
| 711 | # Warm-up. CPython bug bpo-29620. |
| 712 | try: |
| 713 | with self.assertWarns(UserWarning): |
| 714 | Backtest(df, SmaCross) |
| 715 | except RuntimeError: |
| 716 | pass |
| 717 | |
| 718 | with self.assertWarns(UserWarning): |
| 719 | bt = Backtest(df, SmaCross) |
| 720 | bt.run() |
| 721 | with _tempfile() as f: |
| 722 | bt.plot(filename=f, open_browser=False) |
| 723 | |
| 724 | def test_preview(self): |
| 725 | class Strategy(SmaCross): |