Skip to content

Commit

Permalink
Merge c5dc7b7 into f340c5b
Browse files Browse the repository at this point in the history
  • Loading branch information
deepsource-autofix[bot] committed Oct 6, 2022
2 parents f340c5b + c5dc7b7 commit 6dc36b4
Showing 1 changed file with 3 additions and 12 deletions.
15 changes: 3 additions & 12 deletions test/test.py
Expand Up @@ -574,10 +574,7 @@ def test_sympy_function_fails_as_variable(self):
y = np.random.randn(100)
with self.assertRaises(ValueError) as cm:
model.fit(X, y, variable_names=["x1", "N"])
self.assertIn(
"Variable name",
str(cm.exception)
)
self.assertIn("Variable name", str(cm.exception))

def test_bad_variable_names_fail(self):
model = PySRRegressor()
Expand All @@ -586,17 +583,11 @@ def test_bad_variable_names_fail(self):

with self.assertRaises(ValueError) as cm:
model.fit(X, y, variable_names=["Tr(Tij)"])
self.assertIn(
"Invalid variable name",
str(cm.exception)
)
self.assertIn("Invalid variable name", str(cm.exception))

with self.assertRaises(ValueError) as cm:
model.fit(X, y, variable_names=["f{c}"])
self.assertIn(
"Invalid variable name",
str(cm.exception)
)
self.assertIn("Invalid variable name", str(cm.exception))

def test_pickle_with_temp_equation_file(self):
"""If we have a temporary equation file, unpickle the estimator."""
Expand Down

0 comments on commit 6dc36b4

Please sign in to comment.