import unittest
from screen import screen
class Tests(unittest.TestCase):
    def test_cases(self):
        base=dict(mode='simulation',independent_edges='36000000000',channel_a='36000000000',channel_b='36000000000',invalid='0',expected_invalid='0')
        for patch,want in [({},'pass_exact'),({'channel_a':'35999999999'},'fail_count'),({'channel_a':'1','channel_b':'1'},'fail_count'),({'invalid':'1'},'fail_invalid'),({'invalid':'1','expected_invalid':'1'},'pass_fault_detection'),({'expected_invalid':'1'},'fail_fault_detection'),({'channel_b':''},'incomplete_or_invalid_record'),({'independent_edges':'0'},'incomplete_or_invalid_record'),({'channel_a':'-1'},'incomplete_or_invalid_record'),({'mode':'unknown'},'incomplete_or_invalid_record')]:
            with self.subTest(patch=patch): self.assertEqual(screen(base|patch),want)
