Skip to content

Commit

Permalink
Merge pull request #38 from pyiron/executorlib
Browse files Browse the repository at this point in the history
Test with Executorlib
  • Loading branch information
jan-janssen authored Oct 1, 2024
2 parents 6864359 + 7a2c10b commit 1adb010
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/test_conda_function.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@

try:
from conda_subprocess.decorator import conda
from executorlib import Executor
from executorlib.shared.executor import cloudpickle_register
except ImportError:

Expand Down Expand Up @@ -33,3 +34,11 @@ def test_conda_function(self):
number, prefix = add_function(parameter_1=1, parameter_2=2)
self.assertEqual(prefix[-5:], "py312")
self.assertEqual(number, 3)

def test_conda_function_with_executorlib(self):
cloudpickle_register(ind=1)
with Executor(max_cores=1, backend="local", hostname_localhost=True) as exe:
future = exe.submit(add_function, 1, 2)
number, prefix = future.result()
self.assertEqual(prefix[-5:], "py312")
self.assertEqual(number, 3)

0 comments on commit 1adb010

Please sign in to comment.