blocks-transformer/test_block.py
Ankur Malik b3be1ebf66
All checks were successful
Build and Push Docker Image / test (push) Successful in 1m5s
Build and Push Docker Image / build_and_push (push) Successful in 21s
Add hd_score_g2 support and reason-based scoring
2025-11-26 11:58:53 -05:00

18 lines
611 B
Python

import unittest
from block import __main__
data = {'hd_score_m1': 1173.0, 'hd_score_g1': 1203.0, 'hd_score_s1': 1240.0, 'hd_score_s2': 0, 'hd_score_s3': 0, 'hd_score_iso_m2': 1001.0, 'hd_score_g2': 0.0}
class TestBlock(unittest.TestCase):
def test_main_success(self):
# blockResult = main(data)
blockResult = __main__(**data)
# breakpoint()
self.assertIsInstance(blockResult, dict, "Result should be a dictionary.")
self.assertIn("hd_score", blockResult, "Result dictionary should contain 'hd_score' if success.")
if __name__ == "__main__":
unittest.main()