diff --git a/tests/unit/test_dependency_profiles.py b/tests/unit/test_dependency_profiles.py index 3e9a47f..a23b12b 100644 --- a/tests/unit/test_dependency_profiles.py +++ b/tests/unit/test_dependency_profiles.py @@ -84,7 +84,7 @@ def test_client_profiles_are_isolated_by_hardware(): assert "paho-mqtt" not in raspberry_pi_dependencies -def test_tensorflow_uses_platform_specific_supported_versions(): +def test_tensorflow_is_declared_unpinned_in_every_profile(): profiles = _project_config()["optional-dependencies"] for profile_name in ( @@ -99,22 +99,10 @@ def test_tensorflow_uses_platform_specific_supported_versions(): tensorflow_requirements = [ req for req in requirements if req.name == "tensorflow" ] - intel_macos = next( - req - for req in tensorflow_requirements - if "platform_machine == \"x86_64\"" in str(req.marker) - and "sys_platform == \"darwin\"" in str(req.marker) - ) - modern_platforms = next( - req - for req in tensorflow_requirements - if "platform_machine != \"x86_64\"" in str(req.marker) - and "sys_platform != \"darwin\"" in str(req.marker) - ) - - assert len(tensorflow_requirements) == 2 - assert ">=2.16" in str(intel_macos.specifier) - assert "<2.17" in str(intel_macos.specifier) - assert ">=2.17" in str(modern_platforms.specifier) - assert "<3" in str(modern_platforms.specifier) + + # tensorflow is intentionally version-agnostic so profiles are not + # tied to a specific release: exactly one plain, unpinned requirement. + assert len(tensorflow_requirements) == 1 + assert str(tensorflow_requirements[0].specifier) == "" + assert tensorflow_requirements[0].marker is None assert all(req.name != "tensorflow-macos" for req in requirements)