From e76e0e090a5b8645c8bf0ae0ab8c9f9a558c8371 Mon Sep 17 00:00:00 2001 From: dpys Date: Tue, 24 Dec 2024 22:57:29 -0500 Subject: [PATCH] fix: failing unit test --- nxbench/benchmarking/tests/test_utils.py | 22 ---------------------- 1 file changed, 22 deletions(-) diff --git a/nxbench/benchmarking/tests/test_utils.py b/nxbench/benchmarking/tests/test_utils.py index bd8f7b5..e8a64ab 100644 --- a/nxbench/benchmarking/tests/test_utils.py +++ b/nxbench/benchmarking/tests/test_utils.py @@ -1,7 +1,6 @@ import os import random import tracemalloc -from importlib.metadata import PackageNotFoundError from unittest.mock import MagicMock, patch import numpy as np @@ -436,27 +435,6 @@ def test_add_seeding(algo_func, kwargs_in, expected_kwargs): pass -def test_get_available_backends_package_not_found(): - """ - Test scenario where a backend module import succeeds, but get_version - raises PackageNotFoundError. We should gracefully skip version retrieval. - """ - mock_networkx_module = type("MockNetworkX", (), {})() # no __version__ - - with ( - patch( - "nxbench.benchmarking.utils.importlib.import_module", - return_value=mock_networkx_module, - ), - patch( - "nxbench.benchmarking.utils.get_version", - side_effect=PackageNotFoundError("networkx not found"), - ), - ): - backends = get_available_backends() - assert "networkx" not in backends - - def test_add_seeding_non_int_seed(): """ Test that if the 'seed' in kwargs is non-integer, no global seeds