Skip to content

Commit f3a0bc1

Browse files
committed
TST: Fix test_multiprocessing_windows_spawn on recent Pandas
Fixes error: > TypeError: Index(...) must be called with a collection of some kind, '[^_]' was passed
1 parent 8aa8e74 commit f3a0bc1

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

backtesting/test/_test.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -611,7 +611,7 @@ def test_multiprocessing_windows_spawn(self):
611611
stats2 = Backtest(df, SmaCross).optimize(**kw)
612612

613613
self.assertIn('multiprocessing support', cm.warning.args[0])
614-
assert stats1.filter('[^_]').equals(stats2.filter('[^_]')), (stats1, stats2)
614+
assert stats1.filter(chars := tuple('[^_]')).equals(stats2.filter(chars)), (stats1, stats2)
615615

616616
def test_optimize_invalid_param(self):
617617
bt = Backtest(GOOG.iloc[:100], SmaCross)

0 commit comments

Comments
 (0)