Skip to content

Commit c49d192

Browse files
committed
TST: TestDocs.test_examples with per-file subTest
1 parent 493ba19 commit c49d192

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

backtesting/test/_test.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -909,7 +909,8 @@ def test_examples(self):
909909
self.assertGreaterEqual(len(examples), 4)
910910
with chdir(gettempdir()):
911911
for file in examples:
912-
run_path(file)
912+
with self.subTest(example=os.path.basename(file)):
913+
run_path(file)
913914

914915
def test_backtest_run_docstring_contains_stats_keys(self):
915916
stats = Backtest(SHORT_DATA, SmaCross).run()

0 commit comments

Comments
 (0)