(self)
| 122 | Backtest(df, S).run() |
| 123 | |
| 124 | def test_data_invalid(self): |
| 125 | with self.assertRaises(TypeError): |
| 126 | Backtest(GOOG.index, SmaCross).run() |
| 127 | with self.assertRaises(ValueError): |
| 128 | Backtest(GOOG.iloc[:0], SmaCross).run() |
| 129 | |
| 130 | def test_assertions(self): |
| 131 | class Assertive(Strategy): |