Back to index

moin  1.9.0~rc2
Public Member Functions | Private Member Functions
MoinMoin._tests.test_wikiutil.TestAnchorNames Class Reference

List of all members.

Public Member Functions

def test_anchor_name_encoding

Private Member Functions

def _check

Detailed Description

Definition at line 898 of file test_wikiutil.py.


Member Function Documentation

def MoinMoin._tests.test_wikiutil.TestAnchorNames._check (   self,
  text,
  expected 
) [private]

Definition at line 914 of file test_wikiutil.py.

00914 
00915     def _check(self, text, expected):
00916         encoded = wikiutil.anchor_name_from_text(text)
00917         assert expected == encoded

Here is the caller graph for this function:

Definition at line 899 of file test_wikiutil.py.

00899 
00900     def test_anchor_name_encoding(self):
00901         tests = [
00902             # text                    expected output
00903             (u'\xf6\xf6ll\xdf\xdf',   'A.2BAPYA9g-ll.2BAN8A3w-'),
00904             (u'level 2',              'level_2'),
00905             (u'level_2',              'level_2'),
00906             (u'',                     'A'),
00907             (u'123',                  'A123'),
00908             # make sure that a valid anchor is not modified:
00909             (u'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_.-',
00910              u'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789:_.-')
00911         ]
00912         for text, expected in tests:
00913             yield self._check, text, expected

Here is the call graph for this function:


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