MilesCranmer commited on
Commit
21d6b92
1 Parent(s): 51a22aa

Test for issue where warm_start set at init

Browse files
Files changed (1) hide show
  1. test/test.py +6 -0
test/test.py CHANGED
@@ -178,6 +178,12 @@ class TestPipeline(unittest.TestCase):
178
  self.assertTrue("None" not in regressor.__repr__())
179
  self.assertTrue(">>>>" in regressor.__repr__())
180
 
 
 
 
 
 
 
181
  def test_noisy(self):
182
 
183
  y = self.X[:, [0, 1]] ** 2 + self.rstate.randn(self.X.shape[0], 1) * 0.05
 
178
  self.assertTrue("None" not in regressor.__repr__())
179
  self.assertTrue(">>>>" in regressor.__repr__())
180
 
181
+ def test_warm_start_set_at_init(self):
182
+ # Smoke test for bug where warm_start=True is set at init
183
+ y = self.X[:, 0]
184
+ regressor = PySRRegressor(warm_start=True, max_evals=10)
185
+ regressor.fit(self.X, y)
186
+
187
  def test_noisy(self):
188
 
189
  y = self.X[:, [0, 1]] ** 2 + self.rstate.randn(self.X.shape[0], 1) * 0.05