def test_interface_version_missing_mount_point(self, mbed_lstools_mock): """ Test that checks function returns correctly when no mount point is supplied. :param mbed_lstools_mock: Mocks Mbed LS tools with MbedLsToolsMock :return """ interface_version = get_interface_version(self.missing_mount_point) assert interface_version == 'unknown'
def test_interface_version_wrong_mount_point(self, mbed_lstools_mock): """ Test that checks function returns correctly when there is no board attached to supplied mount point. :param mbed_lstools_mock: Mocks Mbed LS tools with MbedLsToolsMock :return """ interface_version = get_interface_version(self.invalid_mount_point) assert interface_version == 'unknown'
def test_interface_version_valid(self, mbed_lstools_mock): """ Test that checks function returns correctly when given a valid Interface Version :param mbed_lstools_mock: Mocks Mbed LS tools with MbedLsToolsMock :return """ interface_version = get_interface_version(self.mount_point) assert interface_version == '0244'
def test_version_none(self, mbed_lstools_mock): """ Test that checks function returns correctly when a valid mount point is supplied but DETAILS.txt is not present. :param mbed_lstools_mock: Mocks Mbed LS tools with MbedLsToolsMock :return """ interface_version = get_interface_version(self.mount_point) assert interface_version == 'unknown'
def test_interface_version_missing_interface_version(self, mbed_lstools_mock): """ Test that checks function returns correctly when DETAILS.txt is present but an interface version is not listed. :param mbed_lstools_mock: Mocks Mbed LS tools with MbedLsToolsMock :return """ interface_version = get_interface_version(self.mount_point) assert interface_version == 'unknown'