Skip to content

Commit

Permalink
add methods test
Browse files Browse the repository at this point in the history
  • Loading branch information
roman-opentensor committed Dec 23, 2024
1 parent 3be2413 commit a36452c
Showing 1 changed file with 9 additions and 0 deletions.
9 changes: 9 additions & 0 deletions tests/unit_tests/test_subtensor_with_retry.py
Original file line number Diff line number Diff line change
@@ -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,
Expand Down Expand Up @@ -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)

0 comments on commit a36452c

Please sign in to comment.