Skip to content

Commit 7db1bfd

Browse files
committed
Add PySR integration test
1 parent 13f596d commit 7db1bfd

File tree

1 file changed

+36
-0
lines changed

1 file changed

+36
-0
lines changed

pytest/test_all.py

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,39 @@ def test_issue_394():
1717
assert jl.f is f
1818
assert jl.y is y
1919
assert jl.seval("f(x)") == 4
20+
21+
22+
def test_integration_pysr():
23+
"Integration tests for PySR"
24+
import subprocess
25+
import sys
26+
import tempfile
27+
28+
with tempfile.TemporaryDirectory() as tempdir:
29+
subprocess.run([sys.executable, "-m", "virtualenv", tempdir], check=True)
30+
# Install this package
31+
subprocess.run([sys.executable, "-m", "pip", "install", "."], check=True)
32+
# Install PySR with no requirement on JuliaCall
33+
subprocess.run(
34+
[sys.executable, "-m", "pip", "install", "--no-deps", "pysr"], check=True
35+
)
36+
# Install PySR test requirements
37+
subprocess.run(
38+
[
39+
sys.executable,
40+
"-m",
41+
"pip",
42+
"install",
43+
"sympy",
44+
"pandas",
45+
"scikit_learn",
46+
"click",
47+
"setuptools",
48+
"typing_extensions",
49+
"pytest",
50+
"nbval",
51+
],
52+
check=True,
53+
)
54+
# Run PySR main test suite
55+
subprocess.run([sys.executable, "-m", "pysr", "test", "main"], check=True)

0 commit comments

Comments
 (0)