def METHOD_NAME(self):
    data = make_data()
    builder = make_code_builder(data)
    coder = builder.build_code()
    with NamedTemporaryFile() as tmp_fp:
        coder.to_file(tmp_fp.name)
        other_coder = HuffmanCoder.from_file(tmp_fp.name)
        self.assertEqual(coder, other_coder)