File tree Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Expand file tree Collapse file tree 2 files changed +7
-10
lines changed Original file line number Diff line number Diff line change 1313# limitations under the License.
1414
1515load ("@rules_cc//cc:cc_binary.bzl" , "cc_binary" )
16- load ("@rules_shell//shell:sh_test.bzl" , "sh_test" )
1716load ("//python:py_test.bzl" , "py_test" )
1817load (":current_py_cc_headers_tests.bzl" , "current_py_cc_headers_test_suite" )
1918
Original file line number Diff line number Diff line change 1-
21import os .path
2+ import pathlib
33import sys
4- import pefile
54import unittest
6- import pathlib
5+
6+ import pefile
77
88from python .runfiles import runfiles
99
10+
1011class CheckLinkageTest (unittest .TestCase ):
1112 @unittest .skipUnless (sys .platform .startswith ("win" ), "requires windows" )
1213 def test_linkage_windows (self ):
@@ -16,16 +17,13 @@ def test_linkage_windows(self):
1617 self .fail (f"dll at { dll_path } does not exist" )
1718
1819 pe = pefile .PE (dll_path )
19- if not hasattr (pe , ' DIRECTORY_ENTRY_IMPORT' ):
20+ if not hasattr (pe , " DIRECTORY_ENTRY_IMPORT" ):
2021 self .fail ("No import directory found." )
2122
2223 imported_dlls = [
23- entry .dll .decode ('utf-8' ).lower ()
24- for entry in pe .DIRECTORY_ENTRY_IMPORT
25- ]
26- python_dlls = [
27- dll for dll in imported_dlls if dll .startswith ("python3" )
24+ entry .dll .decode ("utf-8" ).lower () for entry in pe .DIRECTORY_ENTRY_IMPORT
2825 ]
26+ python_dlls = [dll for dll in imported_dlls if dll .startswith ("python3" )]
2927 self .assertEqual (python_dlls , ["python3.dll" ])
3028
3129
You can’t perform that action at this time.
0 commit comments