author | Sylvain Thénault <sylvain.thenault@logilab.fr> |
Wed, 07 Apr 2010 09:24:00 +0200 | |
changeset 5173 | 73760bbb66bd |
parent 4766 | 162b2b127b15 |
child 5421 | 8167de96c523 |
permissions | -rw-r--r-- |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
1 |
""" |
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
2 |
|
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
diff
changeset
|
3 |
:organization: Logilab |
4212
ab6573088b4a
update copyright: welcome 2010
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1977
diff
changeset
|
4 |
:copyright: 2001-2010 LOGILAB S.A. (Paris, FRANCE), license is LGPL v2. |
1977
606923dff11b
big bunch of copyright / docstring update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
1802
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:
1802
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:
1802
diff
changeset
|
7 |
""" |
0 | 8 |
import sys |
9 |
from StringIO import StringIO |
|
10 |
from logilab.common.testlib import TestCase, unittest_main |
|
11 |
from cubicweb.devtools import init_test_database |
|
12 |
||
13 |
||
14 |
from cubicweb.server.checkintegrity import check |
|
15 |
||
16 |
class CheckIntegrityTC(TestCase): |
|
17 |
def test(self): |
|
4766
162b2b127b15
[test] get a chance to get proper garbage collection when running pytest on whole cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4675
diff
changeset
|
18 |
repo, cnx = init_test_database() |
0 | 19 |
sys.stderr = sys.stdout = StringIO() |
20 |
try: |
|
21 |
check(repo, cnx, ('entities', 'relations', 'text_index', 'metadata'), |
|
4675
9233a8350420
[test] don't display progress bar when testing checkintegrity
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4252
diff
changeset
|
22 |
reindex=True, fix=True, withpb=False) |
0 | 23 |
finally: |
24 |
sys.stderr = sys.__stderr__ |
|
25 |
sys.stdout = sys.__stdout__ |
|
4766
162b2b127b15
[test] get a chance to get proper garbage collection when running pytest on whole cw
Sylvain Thénault <sylvain.thenault@logilab.fr>
parents:
4675
diff
changeset
|
26 |
repo.shutdown() |
1802
d628defebc17
delete-trailing-whitespace + some copyright update
Adrien Di Mascio <Adrien.DiMascio@logilab.fr>
parents:
0
diff
changeset
|
27 |
|
0 | 28 |
if __name__ == '__main__': |
29 |
unittest_main() |