def test_min_conflicts(): assert min_conflicts(australia) assert min_conflicts(france) tests = [(usa, None)] * 3 assert failure_test(min_conflicts, tests) >= 1/3 australia_impossible = MapColoringCSP(list('RG'), 'SA: WA NT Q NSW V; NT: WA Q; NSW: Q V; T: ') assert min_conflicts(australia_impossible, 1000) is None
def test_min_conflicts(): assert min_conflicts(australia) assert min_conflicts(france) tests = [(usa, None)] * 3 assert failure_test(min_conflicts, tests) > 1/3 australia_impossible = MapColoringCSP(list('RG'), 'SA: WA NT Q NSW V; NT: WA Q; NSW: Q V; T: ') assert min_conflicts(australia_impossible, 1000) is None