fixtures.py 文件源码

python
阅读 33 收藏 0 点赞 0 评论 0

项目:nidaqmx-python 作者: ni 项目源码 文件源码
def x_series_device():
    system = nidaqmx.system.System.local()

    for device in system.devices:
        if (not device.dev_is_simulated and
                device.product_category == ProductCategory.X_SERIES_DAQ and
                len(device.ao_physical_chans) >= 2 and
                len(device.ai_physical_chans) >= 4 and
                len(device.do_lines) >= 8 and
                (len(device.di_lines) == len(device.do_lines)) and
                len(device.ci_physical_chans) >= 4):
            return device

    raise NoFixtureDetectedError(
        'Could not detect a device that meets the requirements to be an '
        'X Series fixture. Cannot proceed to run tests.')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号