ni / nidaqmx-python

A Python API for interacting with NI-DAQmx
Other
443 stars 157 forks source link

Add Digital Stream Reader tests #494

Closed zhindes closed 8 months ago

zhindes commented 8 months ago

What does this Pull Request accomplish?

This ensures we have a test per method for each of the Digital stream readers classes. The existing and new tests all have channel-specific data validation by taking advantage of the behavior of simulated DAQ digital data. This ensures we don't inadvertently swap channels within the Python or underlying C bindings.

Why should this Pull Request be merged?

This will give us confidence that we haven't broken anything as we refactor parts of the Python and driver stack.

What testing has been done?

$ poetry run ni-python-styleguide fix tests && poetry run ni-python-styleguide lint tests && poetry run pytest -rsP -k test___digital
=============================== test session starts ===============================
platform win32 -- Python 3.10.10, pytest-7.4.2, pluggy-1.3.0
rootdir: C:\dev\nidaqmx-python
configfile: pyproject.toml
testpaths: tests
plugins: cov-4.1.0, mock-3.11.1
collected 1641 items / 1585 deselected / 56 selected

tests\component\test_stream_readers.py ..................................... [ 66%]
...................                                                          [100%]

===================================== PASSES ======================================
======================= 56 passed, 1585 deselected in 2.44s =======================
github-actions[bot] commented 8 months ago

Test Results

    30 files  ±  0      30 suites  ±0   36m 52s :stopwatch: + 1m 25s  1 668 tests + 56   1 488 :white_check_mark: + 56    180 :zzz: ±0  0 :x: ±0  25 650 runs  +840  23 030 :white_check_mark: +840  2 620 :zzz: ±0  0 :x: ±0 

Results for commit f49fa5d6. ± Comparison against base commit 173f46be.

:recycle: This comment has been updated with latest results.