refactor: use protocol for BaseMiner and update attributes to be part of the class rather than a __init__ method.

This commit is contained in:
UpstreamData
2024-01-16 14:47:43 -07:00
parent 10293ae24a
commit 307926afbb
135 changed files with 1469 additions and 3262 deletions

View File

@@ -77,6 +77,10 @@ class MinersTest(unittest.TestCase):
for miner_type in MINER_CLASSES.keys():
for miner_model in MINER_CLASSES[miner_type].keys():
miner = MINER_CLASSES[miner_type][miner_model]("127.0.0.1")
if miner.data_locations is None:
raise TypeError(
f"model={miner_model} type={miner_type} has no data locations"
)
for data_point in asdict(miner.data_locations).values():
with self.subTest(
msg=f"Test {data_point['cmd']} signature matches",