MCPcopy Index your code
hub / github.com/kernc/backtesting.py / test_range_axis

Method test_range_axis

backtesting/test/_test.py:708–722  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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):

Callers

nothing calls this directly

Calls 4

runMethod · 0.95
plotMethod · 0.95
BacktestClass · 0.90
_tempfileFunction · 0.85

Tested by

no test coverage detected