comparison babel/tests/support.py @ 599:33c8c68b96c7 trunk

change constructor for babel.support.Translations to __init__(fp=None, domain=None) as its super class gettext.GNUTranslations uses "fp" as well (even if "fileobj" is a better name)
author fschwarz
date Mon, 20 Aug 2012 19:34:42 +0000
parents 838ba3796ad6
children 60f716236946
comparison
equal deleted inserted replaced
598:838ba3796ad6 599:33c8c68b96c7
168 class NullTranslationsTestCase(unittest.TestCase): 168 class NullTranslationsTestCase(unittest.TestCase):
169 def setUp(self): 169 def setUp(self):
170 fp = StringIO() 170 fp = StringIO()
171 write_mo(fp, Catalog(locale='de')) 171 write_mo(fp, Catalog(locale='de'))
172 fp.seek(0) 172 fp.seek(0)
173 self.translations = support.Translations(fileobj=fp) 173 self.translations = support.Translations(fp=fp)
174 self.null_translations = support.NullTranslations(fp=fp) 174 self.null_translations = support.NullTranslations(fp=fp)
175 175
176 def method_names(self): 176 def method_names(self):
177 return [name for name in dir(self.translations) if 'gettext' in name] 177 return [name for name in dir(self.translations) if 'gettext' in name]
178 178
Copyright (C) 2012-2017 Edgewall Software