devtools/test/unittest_testlib.py
branchstable
changeset 6776 eebe86b89285
parent 6341 ad5e08981153
child 8460 b1f6777fc839
equal deleted inserted replaced
6775:b36fbdcc40a4 6776:eebe86b89285
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    13 # FOR A PARTICULAR PURPOSE.  See the GNU Lesser General Public License for more
    14 # details.
    14 # details.
    15 #
    15 #
    16 # You should have received a copy of the GNU Lesser General Public License along
    16 # You should have received a copy of the GNU Lesser General Public License along
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    17 # with CubicWeb.  If not, see <http://www.gnu.org/licenses/>.
    18 """unittests for gct.apptest module
    18 """unittests for cw.devtools.testlib module"""
    19 
       
    20 """
       
    21 
    19 
    22 from cStringIO import StringIO
    20 from cStringIO import StringIO
    23 
    21 
    24 from logilab.common.testlib import (TestCase, unittest_main, TestSuite,
    22 from unittest import TextTestRunner
    25                                     SkipAwareTextTestRunner)
    23 from logilab.common.testlib import TestSuite, TestCase, unittest_main
    26 
    24 
    27 from cubicweb.devtools import htmlparser
    25 from cubicweb.devtools import htmlparser
    28 from cubicweb.devtools.testlib import CubicWebTC
    26 from cubicweb.devtools.testlib import CubicWebTC
    29 from cubicweb.pytestconf import clean_repo_test_cls
    27 from cubicweb.pytestconf import clean_repo_test_cls
    30 
    28 
       
    29 
    31 class WebTestTC(TestCase):
    30 class WebTestTC(TestCase):
    32 
    31 
    33     def setUp(self):
    32     def setUp(self):
    34         output = StringIO()
    33         output = StringIO()
    35         self.runner = SkipAwareTextTestRunner(stream=output)
    34         self.runner = TextTestRunner(stream=output)
    36 
    35 
    37     def test_error_raised(self):
    36     def test_error_raised(self):
    38         class MyWebTest(CubicWebTC):
    37         class MyWebTest(CubicWebTC):
    39 
    38 
    40             def test_error_view(self):
    39             def test_error_view(self):