test/unittest_utils.py
branchstable
changeset 7568 c5ee33fb6a3b
parent 6415 b0b0f097a72d
child 7569 02c338197322
equal deleted inserted replaced
7567:d6366de1d0dc 7568:c5ee33fb6a3b
     1 # copyright 2003-2010 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     1 # copyright 2003-2011 LOGILAB S.A. (Paris, FRANCE), all rights reserved.
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     2 # contact http://www.logilab.fr/ -- mailto:contact@logilab.fr
     3 #
     3 #
     4 # This file is part of CubicWeb.
     4 # This file is part of CubicWeb.
     5 #
     5 #
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
     6 # CubicWeb is free software: you can redistribute it and/or modify it under the
    19 
    19 
    20 import re
    20 import re
    21 import decimal
    21 import decimal
    22 import datetime
    22 import datetime
    23 
    23 
    24 from logilab.common.testlib import TestCase, unittest_main
    24 from logilab.common.testlib import TestCase, DocTest, unittest_main
    25 
    25 
    26 from cubicweb.utils import make_uid, UStringIO, SizeConstrainedList, RepeatList
    26 from cubicweb.utils import make_uid, UStringIO, SizeConstrainedList, RepeatList
    27 from cubicweb.entity import Entity
    27 from cubicweb.entity import Entity
    28 
    28 
    29 try:
    29 try:
   154 
   154 
   155     def test_encoding_unknown_stuff(self):
   155     def test_encoding_unknown_stuff(self):
   156         self.assertEqual(self.encode(TestCase), 'null')
   156         self.assertEqual(self.encode(TestCase), 'null')
   157 
   157 
   158 
   158 
       
   159 class DocTest(DocTest):
       
   160     from cubicweb import utils as module
       
   161 
   159 if __name__ == '__main__':
   162 if __name__ == '__main__':
   160     unittest_main()
   163     unittest_main()