def test_compatibility(): values = [] def test(info): name, = hooks.parse_info(info) values.append(name) hooks.add("test_compatibility", test) hooks.run("test_compatibility", hooks.build_info("str", ("Bobby", ))) hooks.run("test_compatibility", hooks.build_info("str", ("Johnny", ))) assert len(values) == 2 assert values == ["Bobby", "Johnny"]
def test_info(): test = 'some', 'list', 'of', 5, 'things' assert test == hooks.parse_info(hooks.build_info('', test))