mirror of
https://gitee.com/Lyon1998/pikapython.git
synced 2025-01-15 17:02:53 +08:00
26 lines
560 B
Python
26 lines
560 B
Python
import unittest
|
|
|
|
|
|
class TestUnittestAssertions(unittest.TestCase):
|
|
def testEqual(self):
|
|
print("in testEqual...")
|
|
self.assertEqual(0, 0)
|
|
|
|
def testTrue(self):
|
|
print("in testTrue...")
|
|
self.assertTrue(True)
|
|
|
|
def testFalse(self):
|
|
print("in testFalse...")
|
|
self.assertFalse(False)
|
|
|
|
def testFalse2(self):
|
|
print("in testFalse2...")
|
|
self.assertFalse(True)
|
|
|
|
|
|
suit = unittest.TestSuite("test1")
|
|
suit.addTest(TestUnittestAssertions())
|
|
runner = unittest.TextTestRunner()
|
|
res = runner.run(suit)
|