blocks-transformer/test_block.py
admin user d1e90e8a14
All checks were successful
Build and Push Docker Image / test (push) Successful in 10s
Build and Push Docker Image / build_and_push (push) Successful in 20s
Composite score block
2025-03-12 16:16:45 +00:00

18 lines
564 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}
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()