diff --git a/tests/agent_unittests/test_package_version_utils.py b/tests/agent_unittests/test_package_version_utils.py index 6394ef506..2641234b2 100644 --- a/tests/agent_unittests/test_package_version_utils.py +++ b/tests/agent_unittests/test_package_version_utils.py @@ -163,7 +163,7 @@ def version(self): monkeypatch.setattr(pytest, "version", FakeModule.version, raising=False) version = get_package_version("pytest") - assert version not in NULL_VERSIONS, version + assert version not in NULL_VERSIONS and isinstance(version, str), version # This test checks to see if the version is a property of the class @@ -181,4 +181,4 @@ def version(self): monkeypatch.setattr(pytest, "version_tuple", (1, 2, 3), raising=False) version = get_package_version("pytest") - assert version not in NULL_VERSIONS, version + assert version not in NULL_VERSIONS and isinstance(version, str), version