from walsh.walsh import walsh_transform def test_walsh_xor_two_variables(): assert walsh_transform("x1 XOR x2") == [0, 0, 0, 4] def test_walsh_or_two_variables(): assert walsh_transform("x1 OR x2") == [-2, 2, 2, 2] def test_walsh_xor_three_variables(): assert walsh_transform("x1 XOR x2 XOR x3") == [0, 0, 0, 0, 0, 0, 0, 8]