github.phpd.cn/thought-machine/please@v12.2.0+incompatible/tools/please_pex/pex_test.py (about)

     1  """Simple test that our pexer works correctly for a unit test."""
     2  
     3  import unittest
     4  
     5  
     6  class PexTest(unittest.TestCase):
     7  
     8      def testSuccess(self):
     9          """Test records a success."""
    10          self.assertEqual(4, 2**2)
    11  
    12      @unittest.skip("Saving this for when the stars are right")
    13      def testSkipped(self):
    14          """Test skipping a test"""
    15          self.assertEqual(10, 3**3)
    16  
    17      @unittest.expectedFailure
    18      def testSkipped(self):
    19          """Test an expected failure"""
    20          self.assertEqual(132, 4**4)
    21  
    22  
    23  if __name__ == '__main__':
    24      unittest.main()