Spaces:
Running
Running
deepsource-autofix[bot]
commited on
Format code with black
Browse filesThis commit fixes the style issues introduced in f340c5b according to the output
from black.
Details: https://deepsource.io/gh/MilesCranmer/PySR/transform/90c988a3-f3d0-4691-af1a-274e6f0e18ec/
- 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."""
|