mirror of
https://github.com/wassname/ray.git
synced 2026-07-03 06:19:29 +08:00
26 lines
635 B
Python
26 lines
635 B
Python
import pytest
|
|
|
|
import ray
|
|
import ray.cluster_utils
|
|
import ray.test_utils
|
|
|
|
|
|
def test_cross_language_raise_kwargs(shutdown_only):
|
|
ray.init(_load_code_from_local=True)
|
|
|
|
with pytest.raises(Exception, match="kwargs"):
|
|
ray.java_function("a", "b").remote(x="arg1")
|
|
|
|
with pytest.raises(Exception, match="kwargs"):
|
|
ray.java_actor_class("a").remote(x="arg1")
|
|
|
|
|
|
def test_cross_language_raise_exception(shutdown_only):
|
|
ray.init(_load_code_from_local=True)
|
|
|
|
class PythonObject(object):
|
|
pass
|
|
|
|
with pytest.raises(Exception, match="transfer"):
|
|
ray.java_function("a", "b").remote(PythonObject())
|