github.phpd.cn/thought-machine/please@v12.2.0+incompatible/test/parse_test/require_provide_test.py (about)

     1  #!/usr/bin/python
     2  
     3  import unittest
     4  import zipfile
     5  import __main__ as pex_main
     6  
     7  
     8  class RequireProvideTest(unittest.TestCase):
     9  
    10      def test_other_language_not_present(self):
    11          """Test that we don't get the Go file from the dependent rule."""
    12          with zipfile.ZipFile(pex_main.PEX) as zf:
    13              with self.assertRaises(KeyError):
    14                  zf.getinfo('test/parse_test/test_require.go')
    15  
    16      def test_our_language_is_present(self):
    17          """Test that we do get the Python file from the dependent rule."""
    18          with zipfile.ZipFile(pex_main.PEX) as zf:
    19              zf.getinfo('test/parse_test/test_require.py')
    20  
    21  
    22  if __name__ == '__main__':
    23      unittest.main()