Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/workflows/run_unit_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@ jobs:
run: poetry run pip list
- name: Run unit tests and code coverage
run: poetry run pytest ./tests/unit -v --cov=nitypes --junitxml=test_results/nitypes-${{ matrix.os }}-py${{ matrix.python-version }}.xml
- name: Run acceptance tests
run: poetry run pytest ./tests/acceptance -v --junitxml=test_results/nitypes-acceptance-${{ matrix.os }}-py${{ matrix.python-version }}.xml
- name: Run doctests
run: poetry run pytest --doctest-modules src/nitypes -v --junitxml=test_results/nitypes-doctests-${{ matrix.os }}-py${{ matrix.python-version }}.xml
- name: Run benchmarks
run: poetry run pytest ./tests/benchmark -v --junitxml=test_results/nitypes-benchmarks-${{ matrix.os }}-py${{ matrix.python-version }}.xml
- name: Upload test results
Expand Down
2 changes: 1 addition & 1 deletion src/nitypes/waveform/_digital/_port.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def _mask_to_column_indices(
[8]
>>> _mask_to_column_indices(0xDEADBEEF, 32, "little")
[0, 1, 2, 3, 5, 6, 7, 9, 10, 11, 12, 13, 15, 16, 18, 19, 21, 23, 25, 26, 27, 28, 30, 31]
>>> _mask_to_column_indices(-1, 8)
>>> _mask_to_column_indices(-1, 8, "little")
Traceback (most recent call last):
...
ValueError: The mask must be a non-negative integer.
Expand Down
4 changes: 2 additions & 2 deletions src/nitypes/waveform/_digital/_waveform.py
Original file line number Diff line number Diff line change
Expand Up @@ -273,10 +273,10 @@ class DigitalWaveform(Generic[TDigitalState]):
and the digital state from the actual and expected waveforms:

>>> result.failures[0] # doctest: +NORMALIZE_WHITESPACE
DigitalWaveformFailure(sample_index=0, expected_sample_index=0, signal_index=0, column_index=1,
DigitalWaveformFailure(sample_index=0, expected_sample_index=0, signal_index=0,
actual_state=<DigitalState.FORCE_UP: 1>, expected_state=<DigitalState.COMPARE_LOW: 3>)
>>> result.failures[1] # doctest: +NORMALIZE_WHITESPACE
DigitalWaveformFailure(sample_index=1, expected_sample_index=1, signal_index=0, column_index=1,
DigitalWaveformFailure(sample_index=1, expected_sample_index=1, signal_index=0,
actual_state=<DigitalState.FORCE_UP: 1>, expected_state=<DigitalState.COMPARE_LOW: 3>)

Timing information
Expand Down