Brian S. Stephan 5b8dc456f1
option to get the config out of a whole board dump
now you don't need to fiddle with specific byte ranges of a dump, you
can just dump the whole board if that's more convenient, and
visualize-storage will parse that

also more testing in general
2023-06-21 15:20:21 -05:00

27 lines
678 B
Python

"""Create the test fixtures and other data."""
import os
import pytest
HERE = os.path.dirname(os.path.abspath(__file__))
@pytest.fixture
def storage_dump():
"""Read in a test storage dump file (101FE000-10200000) of a GP2040-CE board."""
filename = os.path.join(HERE, 'test-files', 'test-storage-area.bin')
with open(filename, 'rb') as file:
content = file.read()
yield content
@pytest.fixture
def whole_board_dump():
"""Read in a test whole board dump file of a GP2040-CE board."""
filename = os.path.join(HERE, 'test-files', 'test-whole-board.bin')
with open(filename, 'rb') as file:
content = file.read()
yield content