mirror of
https://github.com/wassname/ray.git
synced 2026-08-15 12:45:23 +08:00
Give better error for old-style actor classes. (#3793)
This commit is contained in:
committed by
Philipp Moritz
parent
0537508106
commit
9af5a62e05
@@ -98,6 +98,16 @@ def test_actor_init_error_propagated(ray_start_regular):
|
||||
ray.get(actor.foo.remote())
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.version_info >= (3, 0), reason="This test requires Python 2.")
|
||||
def test_old_style_error(ray_start_regular):
|
||||
with pytest.raises(TypeError):
|
||||
|
||||
@ray.remote
|
||||
class Actor:
|
||||
pass
|
||||
|
||||
|
||||
def test_keyword_args(ray_start_regular):
|
||||
@ray.remote
|
||||
class Actor(object):
|
||||
|
||||
Reference in New Issue
Block a user