mirror of
https://github.com/Hopiu/django.git
synced 2026-03-18 06:50:24 +00:00
23 lines
478 B
Python
23 lines
478 B
Python
from unittest import TestCase, expectedFailure
|
|
|
|
|
|
class FailureTestCase(TestCase):
|
|
def test_sample(self):
|
|
self.assertEqual(0, 1)
|
|
|
|
|
|
class ErrorTestCase(TestCase):
|
|
def test_sample(self):
|
|
raise Exception("test")
|
|
|
|
|
|
class ExpectedFailureTestCase(TestCase):
|
|
@expectedFailure
|
|
def test_sample(self):
|
|
self.assertEqual(0, 1)
|
|
|
|
|
|
class UnexpectedSuccessTestCase(TestCase):
|
|
@expectedFailure
|
|
def test_sample(self):
|
|
self.assertEqual(1, 1)
|