Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
 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)
Beispiel #4
0
 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)
Beispiel #5
0
 def setUp(self):
     SerializerTester.setUp(self)
     self.module = astypes
Beispiel #6
0
 def setUp(self):
     SerializerTester.setUp(self)
     self.module = astypes