Skip to content

Commit

Permalink
TST: TestDocs.test_examples with per-file subTest
Browse files Browse the repository at this point in the history
  • Loading branch information
kernc committed Jan 25, 2021
1 parent 493ba19 commit c49d192
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion backtesting/test/_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -909,7 +909,8 @@ def test_examples(self):
self.assertGreaterEqual(len(examples), 4)
with chdir(gettempdir()):
for file in examples:
run_path(file)
with self.subTest(example=os.path.basename(file)):
run_path(file)

def test_backtest_run_docstring_contains_stats_keys(self):
stats = Backtest(SHORT_DATA, SmaCross).run()
Expand Down

0 comments on commit c49d192

Please sign in to comment.