Python functions to get top-level importables names
0

Configure Feed

Select the types of activity you want to include in your feed.

Add test

Juan Luis Cano Rodríguez (Dec 4, 2023, 10:12 PM +0100) ff339a0d d79b5509

+20 -1
tests/cases/single_script-0.1.0-py2.py3-none-any.whl

This is a binary file and will not be displayed.

-1
tests/test_import.py
··· 1 - import pygetpackages
+20
tests/test_pygetimportables.py
··· 1 + from pathlib import Path 2 + 3 + import pytest 4 + from pygetimportables import get_top_importables_from_wheel 5 + 6 + here = Path(__file__).parent 7 + 8 + 9 + @pytest.mark.parametrize( 10 + "wheel_path, expected_importables", 11 + [ 12 + ( 13 + here / "cases" / "single_script-0.1.0-py2.py3-none-any.whl", 14 + {"single_script"}, 15 + ), 16 + ], 17 + ) 18 + def test_get_packages_from_wheel(wheel_path, expected_importables): 19 + packages = get_top_importables_from_wheel(wheel_path) 20 + assert packages == expected_importables