Skip to content

Documentation tests with dependency version requirements are incorrectly skipped #251

Closed

Description

@KostaIlic2

Tech Debt

Several tests that used to pass (at least for some matrix cases) now always get skipped. The tests are

src/nitypes/_arguments.py::nitypes._arguments.arg_to_float SKIPPED (...) [ 0%]
src/nitypes/_arguments.py::nitypes._arguments.is_dtype SKIPPED (coul...) [ 0%]
src/nitypes/_arguments.py::nitypes._arguments.validate_dtype SKIPPED [ 0%]
src/nitypes/complex/init.py::nitypes.complex SKIPPED (could not ...) [ 0%]

The root cause are changes in pytest-doctestplus behavior introduced in 1.6.0 and not fully rectified in 1.7.0.

I will separately propose a workaround, but that workaround will be much more verbose and contain code duplication, making it worse than the original. The workaround will give us two choices:

  1. Put the workaround in place, and keep this technical debt to put the code back the way it was after the root issue gets fixed.
  2. Live with limited coverage until the root cause gets fixed.

AB#3703865

Activity

  1. added
    tech debtNon-user-visible improvement to code or development process
    on Jan 10, 2026
  2. bkeryan commented on Jun 4, 2026

    @bkeryan
    Collaborator

    @KostaIlic2 is there anything left to do to uptake the fix from scientific-python/pytest-doctestplus#319 ?

  3. KostaIlic2 commented on Jun 18, 2026

    @KostaIlic2
    ContributorAuthor

    @bkeryan, My apologies for delayed response. I don't believe that we have to do anything beyond upgrading the dependency.

    If memory serves me correctly, we could elect to strengthen our documentation tests by making sure that the expected number of them passes to avoid scenarios like the one documented in this issue going forward. Let me know if you want me to document this idea separately and tell me how you want me to classify it.

  4. bkeryan commented on Jun 18, 2026

    @bkeryan
    Collaborator

    Ok.

    I confirmed that https://github.com/ni/nitypes-python/actions/runs/27635964747/job/81723423655 shows that the doctests were run:

    src/nitypes/_arguments.py::nitypes._arguments.arg_to_float PASSED        [  0%]
    src/nitypes/_arguments.py::nitypes._arguments.arg_to_int PASSED          [  0%]
    src/nitypes/_arguments.py::nitypes._arguments.arg_to_uint PASSED         [  0%]
    src/nitypes/_arguments.py::nitypes._arguments.is_dtype PASSED            [  0%]
    src/nitypes/_arguments.py::nitypes._arguments.validate_dtype PASSED      [  0%]
    src/nitypes/_exceptions.py::nitypes._exceptions.add_note PASSED          [  0%]
    src/nitypes/_version.py::nitypes._version.parse_version PASSED           [  0%]
    src/nitypes/bintime/__init__.py::nitypes.bintime.DateTime PASSED         [  0%]
    src/nitypes/bintime/__init__.py::nitypes.bintime.TimeDelta PASSED        [  0%]
    src/nitypes/complex/__init__.py::nitypes.complex PASSED                  [  0%]
    src/nitypes/scalar.py::nitypes.scalar.Scalar PASSED                      [  0%]
    src/nitypes/vector.py::nitypes.vector.Vector PASSED                      [  0%]
    src/nitypes/waveform/__init__.py::nitypes.waveform.AnalogWaveform PASSED [  0%]
    src/nitypes/waveform/__init__.py::nitypes.waveform.ComplexWaveform PASSED [  0%]
    src/nitypes/waveform/__init__.py::nitypes.waveform.DigitalState PASSED   [  0%]
    src/nitypes/waveform/__init__.py::nitypes.waveform.DigitalWaveform PASSED [  0%]
    src/nitypes/waveform/__init__.py::nitypes.waveform.Spectrum PASSED       [  0%]
    src/nitypes/waveform/_digital/_port.py::nitypes.waveform._digital._port._mask_to_column_indices PASSED [  0%]
    src/nitypes/waveform/_digital/_port.py::nitypes.waveform._digital._port.bit_mask PASSED [  0%]
    src/nitypes/waveform/_digital/_port.py::nitypes.waveform._digital._port.get_port_dtype PASSED [  0%]
    src/nitypes/waveform/_digital/_port.py::nitypes.waveform._digital._port.port_to_line_data PASSED [  0%]
    src/nitypes/xy_data.py::nitypes.xy_data.XYData PASSED                    [  0%]
    

    This test summary tells us when tests are removed:

    Test Results
        50 files  ±0      50 suites  ±0   19m 37s ⏱️ -10s
     2 326 tests ±0   2 326 ✅ ±0   0 💤 ±0  0 ❌ ±0 
    59 628 runs  ±0  59 616 ✅ ±0  12 💤 ±0  0 ❌ ±0 

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    tech debtNon-user-visible improvement to code or development process

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions