comparison babel/tests/support.py @ 598:838ba3796ad6 trunk

fix tests on Python 2.4, named tuples are not available there
author fschwarz
date Mon, 20 Aug 2012 19:31:09 +0000
parents f63a07d648b6
children 33c8c68b96c7
comparison
equal deleted inserted replaced
597:92e3eb0a317a 598:838ba3796ad6
197 } 197 }
198 for name in self.method_names(): 198 for name in self.method_names():
199 method = getattr(self.translations, name) 199 method = getattr(self.translations, name)
200 null_method = getattr(self.null_translations, name) 200 null_method = getattr(self.null_translations, name)
201 signature = inspect.getargspec(method) 201 signature = inspect.getargspec(method)
202 parameter_names = [name for name in signature.args if name != 'self'] 202 parameter_names = [name for name in signature[0] if name != 'self']
203 values = [data[name] for name in parameter_names] 203 values = [data[name] for name in parameter_names]
204 self.assertEqual(method(*values), null_method(*values)) 204 self.assertEqual(method(*values), null_method(*values))
205 205
206 206
207 class LazyProxyTestCase(unittest.TestCase): 207 class LazyProxyTestCase(unittest.TestCase):
Copyright (C) 2012-2017 Edgewall Software