PageRenderTime 21ms CodeModel.GetById 13ms app.highlight 4ms RepoModel.GetById 2ms app.codeStats 0ms

/functional_tests/support/xunit/test_xunit_as_suite.py

https://bitbucket.org/jpellerin/nose/
Python | 24 lines | 16 code | 7 blank | 1 comment | 0 complexity | cc19a607d676069ae0a2d8b9f77202a3 MD5 | raw file
 1# -*- coding: utf-8 -*-
 2import sys
 3from nose.exc import SkipTest
 4import unittest
 5
 6class TestForXunit(unittest.TestCase):
 7
 8    def test_success(self):
 9        pass
10
11    def test_fail(self):
12        self.assertEqual("this","that")
13
14    def test_error(self):
15        raise TypeError("oops, wrong type")
16    
17    def test_non_ascii_error(self):
18        raise Exception(u"日本")
19    
20    def test_output(self):
21        sys.stdout.write("test-generated output\n")
22
23    def test_skip(self):
24        raise SkipTest("skipit")