Spaces:
Sleeping
Sleeping
MilesCranmer
commited on
Commit
•
e1e5d77
1
Parent(s):
2e14c41
Create new test for custom project
Browse files- test/test_env.py +15 -0
test/test_env.py
ADDED
@@ -0,0 +1,15 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
"""Contains tests for creating and initializing custom Julia projects"""
|
2 |
+
|
3 |
+
import unittest
|
4 |
+
from pysr import julia_helpers
|
5 |
+
|
6 |
+
|
7 |
+
class TestJuliaProject(unittest.TestCase):
|
8 |
+
def test_custom_shared_env(self):
|
9 |
+
"""Test that we can use PySR in a custom shared env"""
|
10 |
+
test_env_name = "@pysr_test_env"
|
11 |
+
julia_helpers.install(julia_project=test_env_name, quiet=True)
|
12 |
+
Main = julia_helpers.init_julia(julia_project=test_env_name)
|
13 |
+
Main.eval("using SymbolicRegression")
|
14 |
+
# TODO: Test that we are actually in the correct env.
|
15 |
+
# TODO: Delete the env at the end.
|