File tree Expand file tree Collapse file tree 3 files changed +6
-5
lines changed
Expand file tree Collapse file tree 3 files changed +6
-5
lines changed Original file line number Diff line number Diff line change @@ -892,7 +892,7 @@ def recognize(cls, location):
892892
893893 Sub-classes should override to implement their own package recognition.
894894 """
895- return
895+ return cls ()
896896
897897 @property
898898 def component_version (self ):
Original file line number Diff line number Diff line change @@ -97,7 +97,8 @@ def recognize_package(location):
9797 if type_matched and mime_matched and extension_matched :
9898 # we return the first match in the order of PACKAGE_TYPES
9999 logger_debug ('all matching: package is of type:' , package_type )
100-
101- return package_type .recognize (location )
100+ recognized = package_type .recognize (location )
101+ logger_debug ('all matching: recognized as:' , repr (recognized ))
102+ return recognized
102103
103104 logger_debug ('no match: package is not of known type:' , package_type )
Original file line number Diff line number Diff line change @@ -85,10 +85,10 @@ def test_recognize_package_tarball(self):
8585 package = recognize_package (test_file )
8686 assert isinstance (package , packagedcode .models .TarPackage )
8787
88- def test_recognize_cpan_manifest_is_not_yet_supported (self ):
88+ def test_recognize_cpan_manifest_as_plain_package (self ):
8989 test_file = self .get_test_loc ('cpan/MANIFEST' )
9090 package = recognize_package (test_file )
91- assert not package
91+ assert isinstance ( package , packagedcode . models . CpanModule )
9292
9393 def test_recognize_maven_dot_pom (self ):
9494 test_file = self .get_test_loc ('m2/aspectj/aspectjrt/1.5.3/aspectjrt-1.5.3.pom' )
You can’t perform that action at this time.
0 commit comments