コード例 #1
0
ファイル: JsonPickle_test.py プロジェクト: vishnur/ufora
    def test_cgPickling_basic(self):
        loc1 = LocationA(value=10)
        self.assertPicklable(loc1)

        loc2 = LocationA(value=(1, 2, 3))
        self.assertPicklable(loc2)

        loc3 = LocationA(value=({1: 2}, "2", 3, 4.0, None, 5L))

        self.assertPicklable(loc3)

        loc4 = LocationB(value=loc1, value2=loc2)
        self.assertPicklable(loc4)

        loc4 = LocationB(value=loc4, value2=loc4)
        self.assertPicklable(loc4)

        #verify that the override worked
        self.assertTrue("__LocB__" in repr(JsonPickle.toSimple(loc4)))
コード例 #2
0
ファイル: JsonPickle_test.py プロジェクト: Sandy4321/ufora
    def test_cgPickling_basic(self):
        loc1 = LocationA(value = 10)
        self.assertPicklable(loc1)

        loc2 = LocationA(value = (1,2,3))
        self.assertPicklable(loc2)

        loc3 = LocationA(value = ({1:2},"2",3, 4.0, None, 5L))

        self.assertPicklable(loc3)

        loc4 = LocationB(value=loc1, value2=loc2)
        self.assertPicklable(loc4)

        loc4 = LocationB(value=loc4, value2=loc4)
        self.assertPicklable(loc4)

        #verify that the override worked
        self.assertTrue("__LocB__" in repr(JsonPickle.toSimple(loc4)))
コード例 #3
0
ファイル: Node.py プロジェクト: WantonSoup/ufora
def keyspacePathToKeyspaceName(keyspacePath):
    return NativeJson.Json([JsonPickle.toSimple(x) for x in keyspacePath])
コード例 #4
0
def keyspacePathToKeyspaceName(keyspacePath):
    return NativeJson.Json([JsonPickle.toSimple(x) for x in keyspacePath])