From 0191d42751063a410675f8caa1b4150ecc5fff9b Mon Sep 17 00:00:00 2001 From: Robert Nishihara Date: Fri, 9 Sep 2016 16:46:18 -0700 Subject: [PATCH] Check in runtest.py that the correct version of cloudpickle is installed. (#421) --- test/runtest.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/test/runtest.py b/test/runtest.py index f58ffb3c7..801e33746 100644 --- a/test/runtest.py +++ b/test/runtest.py @@ -102,6 +102,14 @@ DICT_OBJECTS = ([{obj: obj} for obj in PRIMITIVE_OBJECTS if obj.__hash__ is not RAY_TEST_OBJECTS = BASE_OBJECTS + LIST_OBJECTS + TUPLE_OBJECTS + DICT_OBJECTS +# Check that the correct version of cloudpickle is installed. +try: + import cloudpickle + cloudpickle.dumps(Point) +except AttributeError: + cloudpickle_command = "sudo pip install --upgrade git+git://github.com/cloudpipe/cloudpickle.git@0d225a4695f1f65ae1cbb2e0bbc145e10167cce4" + raise Exception("You have an older version of cloudpickle that is not able to serialize namedtuples. Try running \n\n{}\n\n".format(cloudpickle_command)) + class ObjStoreTest(unittest.TestCase): # Test setting up object stores, transfering data between them and retrieving data to a client