From a36452cf4c1fed5219dd34ac8097d21c7cf4ffc7 Mon Sep 17 00:00:00 2001 From: Roman Date: Mon, 23 Dec 2024 12:07:07 -0800 Subject: [PATCH] add methods test --- tests/unit_tests/test_subtensor_with_retry.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/tests/unit_tests/test_subtensor_with_retry.py b/tests/unit_tests/test_subtensor_with_retry.py index 3a7004bb7c..3b1d5043d4 100644 --- a/tests/unit_tests/test_subtensor_with_retry.py +++ b/tests/unit_tests/test_subtensor_with_retry.py @@ -1,5 +1,6 @@ import pytest +from bittensor.core.subtensor import Subtensor from bittensor.core import subtensor_with_retry from bittensor.core.subtensor_with_retry import ( SubtensorWithRetry, @@ -49,3 +50,11 @@ def mock_method(self): with pytest.raises(SubtensorWithRetryError): mock_method(subtensor) + + +def test_all_class_methods_exist_in_subtensor(): + """Tests that all class methods exist in SubtensorWithRetry.""" + exclusion = ["get_retry_seconds"] + for m in dir(subtensor_with_retry.SubtensorWithRetry): + if not m.startswith("_") and m not in exclusion: + assert hasattr(Subtensor, m)