-
Notifications
You must be signed in to change notification settings - Fork 6
/
test_Goulib_markup.py
198 lines (156 loc) · 6.08 KB
/
test_Goulib_markup.py
1
2
3
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
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
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
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
#!/usr/bin/env python
# -*- coding: utf-8 -*-
from nose.tools import assert_equal
from nose import SkipTest
#lines above are inserted automatically by pythoscope. Line below overrides them
import six
from Goulib.tests import *
from Goulib.markup import *
class TestCgiprint:
def test_cgiprint(self):
# assert_equal(expected, cgiprint(inline, unbuff, line_end))
raise SkipTest
class TestTag:
def test_tag(self):
t=tag('tag', 'between', class_='class')
assert_equal(t,'<tag class="class">between</tag>') #Py 3
t=tag('tag', u'b\xc3\xa9twe\xc3\xaa\xc3\xb1', class_='class')
assert_equal(t,'<tag class="class">bétweêñ</tag>')
t=tag('tag', None, style={'align':'left', 'color':'red'}, single=True)
assert_true(t in (
'<tag style="color:red; align:left;" />',
'<tag style="align:left; color:red;" />',
)
)
t=tag('test',r'$\left(x\right)$')
assert_equal(t,r'<test>$\left(x\right)$</test>')
class TestElement:
def test___call__(self):
# element = element(tag, case, parent)
# assert_equal(expected, element.__call__(*args, **kwargs))
raise SkipTest
def test___init__(self):
# element = element(tag, case, parent)
raise SkipTest
def test_close(self):
# element = element(tag, case, parent)
# assert_equal(expected, element.close())
raise SkipTest
def test_open(self):
# element = element(tag, case, parent)
# assert_equal(expected, element.open(**kwargs))
raise SkipTest
def test_render(self):
# element = element(tag, case, parent)
# assert_equal(expected, element.render(t, single, between, kwargs))
raise SkipTest
class TestPage:
@classmethod
def setup_class(self):
self.page=page()
pass
def test___init__(self):
pass
def test___call__(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.__call__(escape))
raise SkipTest
def test___getattr__(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.__getattr__(attr))
raise SkipTest
def test___str__(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.__str__())
raise SkipTest
def test_add(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.add(text))
raise SkipTest
def test_addcontent(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.addcontent(text))
raise SkipTest
def test_addfooter(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.addfooter(text))
raise SkipTest
def test_addheader(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.addheader(text))
raise SkipTest
def test_css(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.css(filelist))
raise SkipTest
def test_init(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.init(lang, css, metainfo, title, header, footer, charset, encoding, doctype, bodyattrs, script, base))
raise SkipTest
def test_metainfo(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.metainfo(mydict))
raise SkipTest
def test_scripts(self):
# page = page(mode, case, onetags, twotags, separator, class_)
# assert_equal(expected, page.scripts(mydict))
raise SkipTest
class TestEscape:
def test_escape(self):
# assert_equal(expected, escape(text, newline))
raise SkipTest
class TestUnescape:
def test_unescape(self):
# assert_equal(expected, unescape(text))
raise SkipTest
class TestRussell:
def test___contains__(self):
# russell = russell()
# assert_equal(expected, russell.__contains__(item))
raise SkipTest
class TestClosingError:
def test___init__(self):
# closing_error = ClosingError(tag)
raise SkipTest
class TestOpeningError:
def test___init__(self):
# opening_error = OpeningError(tag)
raise SkipTest
class TestArgumentError:
def test___init__(self):
# argument_error = ArgumentError(tag)
raise SkipTest
class TestInvalidElementError:
def test___init__(self):
# invalid_element_error = InvalidElementError(tag, mode)
raise SkipTest
class TestDeprecationError:
def test___init__(self):
# deprecation_error = DeprecationError(tag)
raise SkipTest
class TestModeError:
def test___init__(self):
# mode_error = ModeError(mode)
raise SkipTest
class TestCustomizationError:
def test___init__(self):
# customization_error = CustomizationError()
raise SkipTest
class TestStyleDict2str:
def test_style_dict2str(self):
# assert_equal(expected, style_dict2str(style))
raise SkipTest
class TestStyleStr2dict:
def test_style_str2dict(self):
# assert_equal(expected, style_str2dict(style))
raise SkipTest
class test__oneliner:
def test___getattr__(self):
# _oneliner = _oneliner(case)
# assert_equal(expected, _oneliner.__getattr__(attr))
raise SkipTest # implement your test here
def test___init__(self):
# _oneliner = _oneliner(case)
raise SkipTest # implement your test here
if __name__=="__main__":
runmodule()