call site 0 for xml.escape.__call__
apigen/rest/testing/test_htmlhandlers.py - line 38
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
   def test_breadcrumb():
       h = PageHandler()
       for fname, expected in [
               ('module_py', '<a href="module_py.html">py</a>'),
               ('module_py.test',
                   '<a href="module_py.test.html">py.test</a>'),
               ('class_py.test',
                   ('<a href="module_py.html">py</a>.'
                    '<a href="class_py.test.html">test</a>')),
               ('class_py.test.foo',
                   ('<a href="module_py.test.html">py.test</a>.'
                    '<a href="class_py.test.foo.html">foo</a>')),
               ('class_py.test.foo.bar',
                   ('<a href="module_py.test.foo.html">py.test.foo</a>.'
                    '<a href="class_py.test.foo.bar.html">bar</a>')),
               ('function_foo', '<a href="function_foo.html">foo</a>'),
               ('function_foo.bar',
                   ('<a href="module_foo.html">foo</a>.'
                    '<a href="function_foo.bar.html">bar</a>')),
               ('function_foo.bar.baz',
                   ('<a href="module_foo.bar.html">foo.bar</a>.'
                    '<a href="function_foo.bar.baz.html">baz</a>')),
               ('method_foo.bar',
                   ('<a href="class_foo.html">foo</a>.'
                    '<a href="method_foo.bar.html">bar</a>')),
               ('method_foo.bar.baz',
                   ('<a href="module_foo.html">foo</a>.'
                    '<a href="class_foo.bar.html">bar</a>.'
                    '<a href="method_foo.bar.baz.html">baz</a>')),
               ('method_foo.bar.baz.qux',
                   ('<a href="module_foo.bar.html">foo.bar</a>.'
                    '<a href="class_foo.bar.baz.html">baz</a>.'
                    '<a href="method_foo.bar.baz.qux.html">qux</a>')),
               ]:
->         html = ''.join([unicode(el) for el in h.breadcrumb(fname)])
           print fname
           print html
           assert html == expected
xmlobj/xml.py - line 15
14
15
   def __unicode__(self):
->     return self.unicode(indent=0) 
xmlobj/html.py - line 34
32
33
34
35
   def unicode(self, indent=2):
       l = []
->     HtmlVisitor(l.append, indent, shortempty=False).visit(self) 
       return u"".join(l) 
xmlobj/visit.py - line 31
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   def visit(self, node): 
       """ dispatcher on node's class/bases name. """
       cls = node.__class__
       try:
           visitmethod = self.cache[cls]   
       except KeyError:
           for subclass in cls.__mro__: 
               visitmethod = getattr(self, subclass.__name__, None)
               if visitmethod is not None:
                   break
           else:
               visitmethod = self.object 
           self.cache[cls] = visitmethod
->     visitmethod(node) 
xmlobj/visit.py - line 59
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
   def Tag(self, tag):
       assert id(tag) not in self.visited
       try: 
           tag.parent = self.parents[-1]
       except IndexError: 
           tag.parent = None 
       self.visited[id(tag)] = 1
       tagname = getattr(tag, 'xmlname', tag.__class__.__name__)
       if self.curindent and not self._isinline(tagname):
           self.write("\n" + u' ' * self.curindent) 
       if tag:
           self.curindent += self.indent 
           self.write(u'<%s%s>' % (tagname, self.attributes(tag)))
           self.parents.append(tag) 
->         map(self.visit, tag)
           self.parents.pop() 
           self.write(u'</%s>' % tagname) 
           self.curindent -= self.indent 
       else:
           nameattr = tagname+self.attributes(tag) 
           if self._issingleton(tagname): 
               self.write(u'<%s/>' % (nameattr,))
           else: 
               self.write(u'<%s></%s>' % (nameattr, tagname))
xmlobj/visit.py - line 31
18
19
20
21
22
23
24
25
26
27
28
29
30
31
   def visit(self, node): 
       """ dispatcher on node's class/bases name. """
       cls = node.__class__
       try:
           visitmethod = self.cache[cls]   
       except KeyError:
           for subclass in cls.__mro__: 
               visitmethod = getattr(self, subclass.__name__, None)
               if visitmethod is not None:
                   break
           else:
               visitmethod = self.object 
           self.cache[cls] = visitmethod
->     visitmethod(node) 
xmlobj/visit.py - line 35
33
34
35
   def object(self, obj):
       #self.write(obj) 
->     self.write(escape(unicode(obj)))