def run_tests(self): SerializerTester.run_tests(self) getter, maker = (getattr(self.module, 'get_' + self.name), getattr(self.module, 'make_' + self.name)) value_type = getattr(constants, 'VALUE_TYPE_' + self.name.upper()) for value in self.equivalence_tests: self.script_data_value_equivalent(value, getter, maker, value_type)
def equivalent(self, val, getter, maker): SerializerTester.equivalent(self, val, getter, maker) s = StringIO(maker(val)) s.seek(1) self.assertRaises(primitives.EndOfFile, getter, s)
def setUp(self): SerializerTester.setUp(self) self.module = astypes