Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
ddadb22
1
Parent(s):
65159ce
Sanitize nb output for testing
Browse files- pysr/test/nb_sanitize.cfg +3 -0
- pysr/test/test_nb.ipynb +0 -1
- pysr/test/test_startup.py +2 -0
pysr/test/nb_sanitize.cfg
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
[pathnames]
|
2 |
+
regex: ^[a-zA-Z0-9_\-/]+/pysr/sr\.py
|
3 |
+
replace: PATH
|
pysr/test/test_nb.ipynb
CHANGED
@@ -7,7 +7,6 @@
|
|
7 |
"outputs": [],
|
8 |
"source": [
|
9 |
"# NBVAL_IGNORE_OUTPUT\n",
|
10 |
-
"import warnings\n",
|
11 |
"import numpy as np\n",
|
12 |
"from pysr import PySRRegressor, jl"
|
13 |
]
|
|
|
7 |
"outputs": [],
|
8 |
"source": [
|
9 |
"# NBVAL_IGNORE_OUTPUT\n",
|
|
|
10 |
"import numpy as np\n",
|
11 |
"from pysr import PySRRegressor, jl"
|
12 |
]
|
pysr/test/test_startup.py
CHANGED
@@ -135,6 +135,8 @@ class TestStartup(unittest.TestCase):
|
|
135 |
"pytest",
|
136 |
"--nbval",
|
137 |
str(Path(__file__).parent / "test_nb.ipynb"),
|
|
|
|
|
138 |
],
|
139 |
env=os.environ,
|
140 |
)
|
|
|
135 |
"pytest",
|
136 |
"--nbval",
|
137 |
str(Path(__file__).parent / "test_nb.ipynb"),
|
138 |
+
"--nbval-sanitize-with",
|
139 |
+
str(Path(__file__).parent / "nb_sanitize.cfg"),
|
140 |
],
|
141 |
env=os.environ,
|
142 |
)
|