import pytest from ..helpers import Suite @pytest.mark.slow_integration_test def test_crc32(): with open('examples/crc32.py', 'r', encoding='ASCII') as fil: code_py = "\n" + fil.read() # https://reveng.sourceforge.io/crc-catalogue/legend.htm#crc.legend.params in_put = b'123456789' # https://reveng.sourceforge.io/crc-catalogue/17plus.htm#crc.cat.crc-32-iso-hdlc check = 0xcbf43926 result = Suite(code_py).run_code(in_put, func_name='crc32', do_format_check=False) assert check == result.returned_value