MilesCranmer commited on
Commit
ac8d00e
2 Parent(s): f340c5b c5dc7b7

Merge pull request #200 from MilesCranmer/deepsource-transform-79c15f10

Browse files
Files changed (1) hide show
  1. test/test.py +3 -12
test/test.py CHANGED
@@ -574,10 +574,7 @@ class TestMiscellaneous(unittest.TestCase):
574
  y = np.random.randn(100)
575
  with self.assertRaises(ValueError) as cm:
576
  model.fit(X, y, variable_names=["x1", "N"])
577
- self.assertIn(
578
- "Variable name",
579
- str(cm.exception)
580
- )
581
 
582
  def test_bad_variable_names_fail(self):
583
  model = PySRRegressor()
@@ -586,17 +583,11 @@ class TestMiscellaneous(unittest.TestCase):
586
 
587
  with self.assertRaises(ValueError) as cm:
588
  model.fit(X, y, variable_names=["Tr(Tij)"])
589
- self.assertIn(
590
- "Invalid variable name",
591
- str(cm.exception)
592
- )
593
 
594
  with self.assertRaises(ValueError) as cm:
595
  model.fit(X, y, variable_names=["f{c}"])
596
- self.assertIn(
597
- "Invalid variable name",
598
- str(cm.exception)
599
- )
600
 
601
  def test_pickle_with_temp_equation_file(self):
602
  """If we have a temporary equation file, unpickle the estimator."""
 
574
  y = np.random.randn(100)
575
  with self.assertRaises(ValueError) as cm:
576
  model.fit(X, y, variable_names=["x1", "N"])
577
+ self.assertIn("Variable name", str(cm.exception))
 
 
 
578
 
579
  def test_bad_variable_names_fail(self):
580
  model = PySRRegressor()
 
583
 
584
  with self.assertRaises(ValueError) as cm:
585
  model.fit(X, y, variable_names=["Tr(Tij)"])
586
+ self.assertIn("Invalid variable name", str(cm.exception))
 
 
 
587
 
588
  with self.assertRaises(ValueError) as cm:
589
  model.fit(X, y, variable_names=["f{c}"])
590
+ self.assertIn("Invalid variable name", str(cm.exception))
 
 
 
591
 
592
  def test_pickle_with_temp_equation_file(self):
593
  """If we have a temporary equation file, unpickle the estimator."""