call site 16 for xml.Tag.__init__
apigen/source/testing/test_html.py - line 45
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
   def test_basic():
       tmp = py.test.ensuretemp("sourcehtml")
       inp = tmp.ensure("one.py")
       inp.write(py.code.Source("""
       def func_one():
           pass
       
       def func_two(x, y):
           x = 1
           y = 2
           return x + y
       
       class B:
           pass
       
       class A(B):
           def meth1(self):
               pass
           
           def meth2(self):
               pass
       """))
       
->     testfile = create_html_and_show(inp)
       data = testfile.open().read()
       assert data.find('<a href="#func_one"') != -1
       assert data.find('<a href="#func_two"') != -1
       assert data.find('<a href="#B"') != -1
       assert data.find('<a href="#A"') != -1
       assert data.find('<a href="#A.meth1"') != -1
apigen/source/testing/test_html.py - line 17
15
16
17
18
19
20
   def create_html_and_show(path):
       mod = parse_path(path)
->     html = create_html(mod)
       testfile = py.test.ensuretemp("htmloutput").ensure("test.html")
       testfile.write(unicode(html))
       return testfile
apigen/source/html.py - line 166
159
160
161
162
163
164
165
166
167
168
169
170
   def create_html(mod):
       # out is some kind of stream
       #*[html.tr(html.td(i.name)) for i in mod.get_children()]
       lines = mod.path.open().readlines()
       
       enchanter = HtmlEnchanter(mod)
       enc = get_module_encoding(mod.path)
->     doc = HTMLDocument(enc)
       for i, row in enumerate(lines):
           row = enchanter.enchant_row(i + 1, row)
           doc.add_row(i + 1, row)
       return unicode(doc)
apigen/source/html.py - line 67
63
64
65
66
67
68
69
70
71
72
73
74
75
76
   def __init__(self, encoding, tokenizer=None):
       self.encoding = encoding
   
       self.html = root = html.html()
->     self.head = head = self.create_head()
       root.append(head)
       self.body = body = self.create_body()
       root.append(body)
       self.table, self.tbody = table, tbody = self.create_table()
       body.append(table)
   
       if tokenizer is None:
           tokenizer = Tokenizer(PythonSchema)
       self.tokenizer = tokenizer
apigen/source/html.py - line 134
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
   def create_head(self):
       return html.head(
           html.title('source view'),
           html.style("""
                   body, td {
                       background-color: #FFF;
                       color: black;
                       font-family: monospace, Monaco;
                   }
   
                   table, tr {
                       margin: 0px;
                       padding: 0px;
                       border-width: 0px;
                   }
   
                   a {
                       color: blue;
                       font-weight: bold;
                       text-decoration: none;
                   }
                   
                   a:hover {
                       color: #005;
                   }
                   
                   .lineno {
                       text-align: right;
                       color: #555;
                       width: 3em;
                       padding-right: 1em;
                       border: 0px solid black;
                       border-right-width: 1px;
                   }
                   
                   .code {
                       padding-left: 1em;
                       white-space: pre;
                   }
                   
                   .comment {
                       color: purple;
                   }
   
                   .string {
                       color: #777;
                   }
   
                   .keyword {
                       color: blue;
                   }
   
                   .alt_keyword {
                       color: green;
                   }
                   
->             """, type='text/css'),
       )