@@ -1630,6 +1630,36 @@ def test_scanpipe_pipes_d2d_map_macho_symbols(self):
16301630 ).count (),
16311631 )
16321632
1633+ def test_scanpipe_pipes_d2d_map_python_pyx (self ):
1634+ input_dir = self .project1 .input_path
1635+ input_resources = [
1636+ self .data / "d2d-python/to-intbitset.whl" ,
1637+ self .data / "d2d-python/from-intbitset.tar.gz" ,
1638+ ]
1639+ copy_inputs (input_resources , input_dir )
1640+ self .from_files , self .to_files = d2d .get_inputs (self .project1 )
1641+ inputs_with_codebase_path_destination = [
1642+ (self .from_files , self .project1 .codebase_path / d2d .FROM ),
1643+ (self .to_files , self .project1 .codebase_path / d2d .TO ),
1644+ ]
1645+ for input_files , codebase_path in inputs_with_codebase_path_destination :
1646+ for input_file_path in input_files :
1647+ scancode .extract_archive (input_file_path , codebase_path )
1648+
1649+ scancode .extract_archives (
1650+ self .project1 .codebase_path ,
1651+ recurse = True ,
1652+ )
1653+ pipes .collect_and_create_codebase_resources (self .project1 )
1654+ buffer = io .StringIO ()
1655+ d2d .map_python_pyx_to_binaries (project = self .project1 , logger = buffer .write )
1656+ self .assertEqual (
1657+ 1 ,
1658+ CodebaseRelation .objects .filter (
1659+ project = self .project1 , map_type = "python_pyx_match"
1660+ ).count (),
1661+ )
1662+
16331663 @skipIf (sys .platform == "darwin" , "Test is failing on macOS" )
16341664 def test_scanpipe_pipes_d2d_map_winpe_symbols (self ):
16351665 input_dir = self .project1 .input_path
0 commit comments