(self)
| 222 | ) |
| 223 | |
| 224 | def test_no_stock_dividends_allowed(self): |
| 225 | # try to use sid(4) as benchmark, should blow up due to the presence |
| 226 | # of a stock dividend |
| 227 | |
| 228 | with self.assertRaises(InvalidBenchmarkAsset) as exc: |
| 229 | BenchmarkSource( |
| 230 | self.asset_finder.retrieve_asset(4), |
| 231 | self.trading_calendar, |
| 232 | self.sim_params.sessions, |
| 233 | self.data_portal |
| 234 | ) |
| 235 | |
| 236 | self.assertEqual("Equity(4 [D]) cannot be used as the benchmark " |
| 237 | "because it has a stock dividend on 2006-03-16 " |
| 238 | "00:00:00. Choose another asset to use as the " |
| 239 | "benchmark.", |
| 240 | exc.exception.message) |
| 241 | |
| 242 | |
| 243 | class BenchmarkSpecTestCase(WithTmpDir, |
nothing calls this directly
no test coverage detected