def testUnicode(self): blob = objects.dumps(u'hei') s = objects.loads(blob) self.assertEquals(type(s), unicode) self.assertEquals(s, u'hei') s2 = objects.loads(objects.dumps(('hei', u'hei'))) self.assertEquals(tuple(type(i) for i in s2), (str, unicode)) self.assertEquals(s2, ('hei', u'hei'))
def testVariousObjects(self): check = lambda x:self.assertEquals(objects.loads(objects.dumps(x)), x) check(42) check([]) check(set())
def testVariousObjects(self): check = lambda x: self.assertEquals(objects.loads(objects.dumps(x)), x) check(42) check([]) check(set())