MilesCranmer commited on
Commit
a1457c0
1 Parent(s): db44938

fix: `from pysr import *`

Browse files
Files changed (2) hide show
  1. pysr/__init__.py +0 -1
  2. pysr/test/test.py +9 -0
pysr/__init__.py CHANGED
@@ -18,7 +18,6 @@ __all__ = [
18
  "sklearn_monkeypatch",
19
  "sympy2jax",
20
  "sympy2torch",
21
- "Problem",
22
  "install",
23
  "PySRRegressor",
24
  "best",
 
18
  "sklearn_monkeypatch",
19
  "sympy2jax",
20
  "sympy2torch",
 
21
  "install",
22
  "PySRRegressor",
23
  "best",
pysr/test/test.py CHANGED
@@ -1,3 +1,4 @@
 
1
  import os
2
  import pickle as pkl
3
  import tempfile
@@ -907,6 +908,14 @@ class TestHelpMessages(unittest.TestCase):
907
 
908
  self.assertIn("`unary_operators`, `binary_operators`", str(cm.exception))
909
 
 
 
 
 
 
 
 
 
910
 
911
  TRUE_PREAMBLE = "\n".join(
912
  [
 
1
+ import importlib
2
  import os
3
  import pickle as pkl
4
  import tempfile
 
908
 
909
  self.assertIn("`unary_operators`, `binary_operators`", str(cm.exception))
910
 
911
+ def test_issue_666(self):
912
+ # Try the equivalent of `from pysr import *`
913
+ pysr_module = importlib.import_module("pysr")
914
+ names_to_import = pysr_module.__all__
915
+
916
+ for name in names_to_import:
917
+ getattr(pysr_module, name)
918
+
919
 
920
  TRUE_PREAMBLE = "\n".join(
921
  [