import copy
import glob
import os
import pytest
import pynq

from .mock_devices import MockMemoryMappedDevice


THIS_DIR = os.path.dirname(__file__)
HWH_PATH = os.path.join(THIS_DIR, 'data', '2016.4')

HWH_FILES = [os.path.basename(f)
             for f in glob.glob(os.path.join(HWH_PATH, "*.hwh"))]


@pytest.fixture
def device():
    device = MockMemoryMappedDevice('mmap_device')
    yield device
    device.close()


@pytest.mark.parametrize('hwh_file', HWH_FILES)
def test_complete_description(hwh_file):