From dc60c58dbf59be9df24368e1e7797254d7b75d4a Mon Sep 17 00:00:00 2001 From: tammy-baylis-swi Date: Fri, 3 Jan 2025 16:36:12 -0800 Subject: [PATCH] Add test --- .../tests/test_dependencies.py | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/opentelemetry-instrumentation/tests/test_dependencies.py b/opentelemetry-instrumentation/tests/test_dependencies.py index bdee0f6f01..ca04833181 100644 --- a/opentelemetry-instrumentation/tests/test_dependencies.py +++ b/opentelemetry-instrumentation/tests/test_dependencies.py @@ -86,3 +86,19 @@ def requires(self): str(conflict), 'DependencyConflict: requested: "test-pkg~=1.0; extra == "instruments"" but found: "None"', ) + + def test_get_dist_dependency_conflicts_requires_none(self): + class MockDistribution(Distribution): + def locate_file(self, path): + pass + + def read_text(self, filename): + pass + + @property + def requires(self): + return None + + dist = MockDistribution() + conflict = get_dist_dependency_conflicts(dist) + self.assertTrue(conflict is None)