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

     1  import unittest
     2  import zipfile
     3  
     4  
     5  class SpecificOutTest(unittest.TestCase):
     6  
     7      @unittest.skip('Need third party module override')
     8      def test_python_module_is_importable(self):
     9          """Check that the Python module came through OK."""
    10          from test.proto_rules import test_pb2
    11  
    12      def test_no_go_files(self):
    13          """Test that there aren't any Go files in the .pex.
    14  
    15          If this fails the way the proto rules depend on specific files from the protoc rule
    16          probably isn't being selective enough.
    17          """
    18          import __main__ as pex_main
    19          with zipfile.ZipFile(pex_main.PEX) as zf:
    20              with self.assertRaises(KeyError):
    21                  zf.getinfo('test/proto_rules/test.pb.go')