Back to index

python3.2  3.2.2
Public Member Functions | Public Attributes | Private Attributes
test.test_gettext.GettextTestCase2 Class Reference
Inheritance diagram for test.test_gettext.GettextTestCase2:
Inheritance graph
[legend]
Collaboration diagram for test.test_gettext.GettextTestCase2:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def setUp
def test_bindtextdomain
def test_textdomain
def test_some_translations
def test_double_quotes
def test_triple_single_quotes
def test_triple_double_quotes
def test_multiline_strings
def tearDown

Public Attributes

 localedir
 env

Private Attributes

 _

Detailed Description

Definition at line 153 of file test_gettext.py.


Member Function Documentation

Reimplemented from test.test_gettext.GettextBaseTest.

Definition at line 154 of file test_gettext.py.

00154 
00155     def setUp(self):
00156         GettextBaseTest.setUp(self)
00157         self.localedir = os.curdir
00158         # Set up the bindings
00159         gettext.bindtextdomain('gettext', self.localedir)
00160         gettext.textdomain('gettext')
00161         # For convenience
00162         self._ = gettext.gettext

Here is the caller graph for this function:

def test.test_gettext.GettextBaseTest.tearDown (   self) [inherited]

Definition at line 77 of file test_gettext.py.

00077 
00078     def tearDown(self):
00079         self.env.__exit__()
00080         del self.env
00081         shutil.rmtree(os.path.split(LOCALEDIR)[0])
00082 

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 163 of file test_gettext.py.

00163 
00164     def test_bindtextdomain(self):
00165         self.assertEqual(gettext.bindtextdomain('gettext'), self.localedir)

Here is the call graph for this function:

Definition at line 177 of file test_gettext.py.

00177 
00178     def test_double_quotes(self):
00179         eq = self.assertEqual
00180         # double quotes
00181         eq(self._("albatross"), 'albatross')
00182         eq(self._("mullusk"), 'bacon')
00183         eq(self._(r"Raymond Luxury Yach-t"), 'Throatwobbler Mangrove')
00184         eq(self._(r"nudge nudge"), 'wink wink')

Here is the call graph for this function:

Definition at line 201 of file test_gettext.py.

00201 
00202     def test_multiline_strings(self):
00203         eq = self.assertEqual
00204         # multiline strings
00205         eq(self._('''This module provides internationalization and localization
00206 support for your Python programs by providing an interface to the GNU
00207 gettext message catalog library.'''),
00208            '''Guvf zbqhyr cebivqrf vagreangvbanyvmngvba naq ybpnyvmngvba
00209 fhccbeg sbe lbhe Clguba cebtenzf ol cebivqvat na vagresnpr gb gur TAH
00210 trggrkg zrffntr pngnybt yvoenel.''')
00211 

Here is the call graph for this function:

Definition at line 169 of file test_gettext.py.

00169 
00170     def test_some_translations(self):
00171         eq = self.assertEqual
00172         # test some translations
00173         eq(self._('albatross'), 'albatross')
00174         eq(self._('mullusk'), 'bacon')
00175         eq(self._(r'Raymond Luxury Yach-t'), 'Throatwobbler Mangrove')
00176         eq(self._(r'nudge nudge'), 'wink wink')

Here is the call graph for this function:

Definition at line 166 of file test_gettext.py.

00166 
00167     def test_textdomain(self):
00168         self.assertEqual(gettext.textdomain(), 'gettext')

Here is the call graph for this function:

Definition at line 193 of file test_gettext.py.

00193 
00194     def test_triple_double_quotes(self):
00195         eq = self.assertEqual
00196         # triple double quotes
00197         eq(self._("""albatross"""), 'albatross')
00198         eq(self._("""mullusk"""), 'bacon')
00199         eq(self._(r"""Raymond Luxury Yach-t"""), 'Throatwobbler Mangrove')
00200         eq(self._(r"""nudge nudge"""), 'wink wink')

Here is the call graph for this function:

Definition at line 185 of file test_gettext.py.

00185 
00186     def test_triple_single_quotes(self):
00187         eq = self.assertEqual
00188         # triple single quotes
00189         eq(self._('''albatross'''), 'albatross')
00190         eq(self._('''mullusk'''), 'bacon')
00191         eq(self._(r'''Raymond Luxury Yach-t'''), 'Throatwobbler Mangrove')
00192         eq(self._(r'''nudge nudge'''), 'wink wink')

Here is the call graph for this function:


Member Data Documentation

Definition at line 161 of file test_gettext.py.

Definition at line 73 of file test_gettext.py.

Definition at line 156 of file test_gettext.py.


The documentation for this class was generated from the following file: