author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Mon, 21 Sep 2009 19:49:21 +0200 | |
branch | stable |
changeset 3356 | 9ca73fbd3a58 |
parent 3168 | 1ecd1b6d6f1b |
child 3185 | bd0126d17e83 |
child 4212 | ab6573088b4a |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1900
diff
changeset
|
1 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1900
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1900
diff
changeset
|
3 |
:organization: Logilab |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1900
diff
changeset
|
4 |
:copyright: 2001-2009 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1900
diff
changeset
|
5 |
:contact: http://www.logilab.fr/ -- mailto:contact@logilab.fr |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1900
diff
changeset
|
6 |
:license: GNU Lesser General Public License, v2.1 - http://www.gnu.org/licenses |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1900
diff
changeset
|
7 |
""" |
0 | 8 |
from logilab.common.testlib import TestCase, unittest_main |
9 |
||
10 |
from cubicweb.devtools._apptest import FakeRequest |
|
11 |
from cubicweb.devtools.apptest import EnvBasedTC |
|
12 |
||
13 |
from cubicweb.web.views.urlrewrite import SimpleReqRewriter, SchemaBasedRewriter, rgx, rgx_action |
|
14 |
||
15 |
||
16 |
class UrlRewriteTC(TestCase): |
|
17 |
||
18 |
def test_auto_extend_rules(self): |
|
19 |
class Rewriter(SimpleReqRewriter): |
|
20 |
rules = [ |
|
21 |
('foo', dict(rql='Foo F')), |
|
22 |
('/index', dict(vid='index2')), |
|
23 |
] |
|
24 |
rules = [] |
|
25 |
for pattern, values in Rewriter.rules: |
|
26 |
if hasattr(pattern, 'pattern'): |
|
27 |
pattern = pattern.pattern |
|
28 |
rules.append((pattern, values)) |
|
29 |
self.assertListEquals(rules, [ |
|
30 |
('foo' , dict(rql='Foo F')), |
|
31 |
('/index' , dict(vid='index2')), |
|
2780
ad1dfc3855b0
B web/tests back to green
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2439
diff
changeset
|
32 |
('/_', dict(vid='manage')), |
ad1dfc3855b0
B web/tests back to green
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
2439
diff
changeset
|
33 |
('/_registry', dict(vid='registry')), |
2439
77d8dd77acb3
[cleanup] fix tests
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
34 |
('/schema', dict(vid='schema')), |
1900
8dd4bb69c73d
[tests] fix test after eproperties got renamed to cwproperties
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1802
diff
changeset
|
35 |
('/myprefs', dict(vid='propertiesform')), |
8dd4bb69c73d
[tests] fix test after eproperties got renamed to cwproperties
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1802
diff
changeset
|
36 |
('/siteconfig', dict(vid='systempropertiesform')), |
2439
77d8dd77acb3
[cleanup] fix tests
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
37 |
('/siteinfo', dict(vid='info')), |
0 | 38 |
('/manage', dict(vid='manage')), |
2439
77d8dd77acb3
[cleanup] fix tests
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
39 |
('/notfound', dict(vid='404')), |
77d8dd77acb3
[cleanup] fix tests
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
40 |
('/error', dict(vid='error')), |
77d8dd77acb3
[cleanup] fix tests
Nicolas Chauvat <nicolas.chauvat@logilab.fr>
parents:
1977
diff
changeset
|
41 |
('/sparql', dict(vid='sparql')), |
1398
5fe84a5f7035
rename internal entity types to have CW prefix instead of E
sylvain.thenault@logilab.fr
parents:
0
diff
changeset
|
42 |
('/schema/([^/]+?)/?$', {'rql': r'Any X WHERE X is CWEType, X name "\1"', 'vid': 'eschema'}), |
0 | 43 |
('/add/([^/]+?)/?$' , dict(vid='creation', etype=r'\1')), |
44 |
('/doc/images/(.+?)/?$', dict(fid='\\1', vid='wdocimages')), |
|
45 |
('/doc/?$', dict(fid='main', vid='wdoc')), |
|
46 |
('/doc/(.+?)/?$', dict(fid='\\1', vid='wdoc')), |
|
47 |
('/changelog/?$', dict(vid='changelog')), |
|
48 |
# now in SchemaBasedRewriter |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
49 |
#('/search/(.+)$', dict(rql=r'Any X WHERE X has_text "\1"')), |
0 | 50 |
]) |
51 |
||
52 |
||
53 |
def test_no_extend_rules(self): |
|
54 |
class Rewriter(SimpleReqRewriter): |
|
55 |
ignore_baseclass_rules = True |
|
56 |
rules = [ |
|
57 |
('foo', dict(rql='Foo F')), |
|
58 |
('/index', dict(vid='index2')), |
|
59 |
] |
|
60 |
self.assertListEquals(Rewriter.rules, [ |
|
61 |
('foo' , dict(rql='Foo F')), |
|
62 |
('/index' , dict(vid='index2')), |
|
63 |
]) |
|
64 |
||
65 |
def test_basic_transformation(self): |
|
66 |
"""test simple string-based rewrite""" |
|
67 |
rewriter = SimpleReqRewriter() |
|
68 |
req = FakeRequest() |
|
69 |
self.assertRaises(KeyError, rewriter.rewrite, req, '/view?vid=whatever') |
|
70 |
self.assertEquals(req.form, {}) |
|
71 |
rewriter.rewrite(req, '/index') |
|
72 |
self.assertEquals(req.form, {'vid' : "index"}) |
|
73 |
||
74 |
def test_regexp_transformation(self): |
|
75 |
"""test regexp-based rewrite""" |
|
76 |
rewriter = SimpleReqRewriter() |
|
77 |
req = FakeRequest() |
|
78 |
rewriter.rewrite(req, '/add/Task') |
|
79 |
self.assertEquals(req.form, {'vid' : "creation", 'etype' : "Task"}) |
|
80 |
req = FakeRequest() |
|
81 |
rewriter.rewrite(req, '/add/Task/') |
|
82 |
self.assertEquals(req.form, {'vid' : "creation", 'etype' : "Task"}) |
|
83 |
||
84 |
||
85 |
||
86 |
||
87 |
class RgxActionRewriteTC(EnvBasedTC): |
|
88 |
||
89 |
def setup_database(self): |
|
90 |
self.p1 = self.create_user(u'user1') |
|
91 |
self.p1.set_attributes(firstname=u'joe', surname=u'Dalton') |
|
92 |
self.p2 = self.create_user(u'user2') |
|
93 |
self.p2.set_attributes(firstname=u'jack', surname=u'Dalton') |
|
94 |
||
95 |
def test_rgx_action_with_transforms(self): |
|
96 |
class TestSchemaBasedRewriter(SchemaBasedRewriter): |
|
97 |
rules = [ |
|
98 |
(rgx('/(?P<sn>\w+)/(?P<fn>\w+)'), rgx_action(r'Any X WHERE X surname %(sn)s, X firstname %(fn)s', |
|
99 |
argsgroups=('sn', 'fn'), |
|
100 |
transforms={'sn' : unicode.capitalize, |
|
101 |
'fn' : unicode.lower,})), |
|
102 |
] |
|
103 |
rewriter = TestSchemaBasedRewriter() |
|
104 |
req = self.request() |
|
105 |
pmid, rset = rewriter.rewrite(req, u'/DaLToN/JoE') |
|
106 |
self.assertEquals(len(rset), 1) |
|
107 |
self.assertEquals(rset[0][0], self.p1.eid) |
|
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
108 |
|
3168
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
109 |
def test_inheritance_precedence(self): |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
110 |
RQL1 = 'Any C WHERE C is CWEType' |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
111 |
RQL2 = 'Any C WHERE C is CWUser' |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
112 |
|
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
113 |
class BaseRewriter(SchemaBasedRewriter): |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
114 |
rules = [ |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
115 |
(rgx('/collector(.*)'), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
116 |
rgx_action(rql=RQL1, |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
117 |
form=dict(vid='baseindex')), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
118 |
), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
119 |
] |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
120 |
class Rewriter(BaseRewriter): |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
121 |
rules = [ |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
122 |
(rgx('/collector/something(/?)'), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
123 |
rgx_action(rql=RQL2, |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
124 |
form=dict(vid='index')), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
125 |
), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
126 |
] |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
127 |
|
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
128 |
rewriter = Rewriter() |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
129 |
req = self.request() |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
130 |
pmid, rset = rewriter.rewrite(req, '/collector') |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
131 |
self.assertEquals(rset.rql, RQL1) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
132 |
self.assertEquals(req.form, {'vid' : "baseindex"}) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
133 |
pmid, rset = rewriter.rewrite(req, '/collector/something') |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
134 |
self.assertEquals(rset.rql, RQL2) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
135 |
self.assertEquals(req.form, {'vid' : "index"}) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
136 |
pmid, rset = rewriter.rewrite(req, '/collector/something/') |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
137 |
self.assertEquals(req.form, {'vid' : "index"}) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
138 |
self.assertEquals(rset.rql, RQL2) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
139 |
pmid, rset = rewriter.rewrite(req, '/collector/somethingelse/') |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
140 |
self.assertEquals(rset.rql, RQL1) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
141 |
self.assertEquals(req.form, {'vid' : "baseindex"}) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
142 |
|
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
143 |
def test_inheritance_precedence_same_rgx(self): |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
144 |
RQL1 = 'Any C WHERE C is CWEType' |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
145 |
RQL2 = 'Any C WHERE C is CWUser' |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
146 |
|
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
147 |
class BaseRewriter(SchemaBasedRewriter): |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
148 |
rules = [ |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
149 |
(rgx('/collector(.*)'), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
150 |
rgx_action(rql=RQL1, |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
151 |
form=dict(vid='baseindex')), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
152 |
), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
153 |
] |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
154 |
class Rewriter(BaseRewriter): |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
155 |
rules = [ |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
156 |
(rgx('/collector(.*)'), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
157 |
rgx_action(rql=RQL2, |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
158 |
form=dict(vid='index')), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
159 |
), |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
160 |
] |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
161 |
|
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
162 |
rewriter = Rewriter() |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
163 |
req = self.request() |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
164 |
pmid, rset = rewriter.rewrite(req, '/collector') |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
165 |
self.assertEquals(rset.rql, RQL2) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
166 |
self.assertEquals(req.form, {'vid' : "index"}) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
167 |
pmid, rset = rewriter.rewrite(req, '/collector/something') |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
168 |
self.assertEquals(rset.rql, RQL2) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
169 |
self.assertEquals(req.form, {'vid' : "index"}) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
170 |
pmid, rset = rewriter.rewrite(req, '/collector/something/') |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
171 |
self.assertEquals(req.form, {'vid' : "index"}) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
172 |
self.assertEquals(rset.rql, RQL2) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
173 |
pmid, rset = rewriter.rewrite(req, '/collector/somethingelse/') |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
174 |
self.assertEquals(rset.rql, RQL2) |
1ecd1b6d6f1b
[tests] inheritance_precedence in url rewrite
Julien Jehannet <julien.jehannet@logilab.fr>
parents:
2780
diff
changeset
|
175 |
self.assertEquals(req.form, {'vid' : "index"}) |
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1398
diff
changeset
|
176 |
|
0 | 177 |
|
178 |
if __name__ == '__main__': |
|
179 |
unittest_main() |