/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 -*-
  2. import sys
  3. from nose.exc import SkipTest
  4. import unittest
  5. class TestForXunit(unittest.TestCase):
  6. def test_success(self):
  7. pass
  8. def test_fail(self):
  9. self.assertEqual("this","that")
  10. def test_error(self):
  11. raise TypeError("oops, wrong type")
  12. def test_non_ascii_error(self):
  13. raise Exception(u"日本")
  14. def test_output(self):
  15. sys.stdout.write("test-generated output\n")
  16. def test_skip(self):
  17. raise SkipTest("skipit")