MilesCranmer commited on
Commit
6146f6b
1 Parent(s): e511ecf

Add test for multithreading

Browse files
Files changed (1) hide show
  1. test/test.py +8 -0
test/test.py CHANGED
@@ -26,6 +26,14 @@ class TestPipeline(unittest.TestCase):
26
  print(equations)
27
  self.assertLessEqual(equations.iloc[-1]["MSE"], 1e-4)
28
 
 
 
 
 
 
 
 
 
29
  def test_multioutput_custom_operator(self):
30
  y = self.X[:, [0, 1]] ** 2
31
  equations = pysr(
 
26
  print(equations)
27
  self.assertLessEqual(equations.iloc[-1]["MSE"], 1e-4)
28
 
29
+ def test_threading(self):
30
+ y = self.X[:, 0]
31
+ equations = pysr(
32
+ self.X, y, **self.default_test_kwargs, procs=2, multithreading=True
33
+ )
34
+ print(equations)
35
+ self.assertLessEqual(equations.iloc[-1]["MSE"], 1e-4)
36
+
37
  def test_multioutput_custom_operator(self):
38
  y = self.X[:, [0, 1]] ** 2
39
  equations = pysr(