Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit f3a0bc1

Browse filesBrowse 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
Copy full SHA for f3a0bc1

1 file changed

+1-1Lines changed: 1 addition & 1 deletion

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎backtesting/test/_test.py‎

Copy file name to clipboardExpand all lines: backtesting/test/_test.py
+1-1Lines 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 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.