def test_get_selector(): assert PyPi._parse_extra_metadata_to_selector("extra", "==", "win32") == "" assert ( PyPi._parse_extra_metadata_to_selector("sys_platform", "==", "win32") == "win" ) assert ( PyPi._parse_extra_metadata_to_selector("python_version", "<", "3.6") == "py<36" )
def test_platform_system_selector(): assert ( PyPi._parse_extra_metadata_to_selector("platform_system", "==", "Windows") == "win" ) assert ( PyPi._parse_extra_metadata_to_selector("platform_system", "!=", "Windows") == "not win" )