Skip to content

Error in return type for most 'autorange' properties in nidcpower library #2030

@Arkh42

Description

@Arkh42

Description of issue

In the code documentation, most of the "autorange"-related parameter are described as bool, which is wrong.
The correct type is int.

Steps to reproduce issue

``` python
import pytest

import nidcpower

@pytest.fixture
def smu() -> nidcpower.Session:
    return nidcpower.Session(
        resource_name="PXI1Slot2",
        channels=None,
        reset=True,
        options={'range_check': True,
                 'simulate': True,
                 'driver_setup': {'Model': '4163', 'BoardType': 'PXIe'}},
        independent_channels=True)

def test_wrong_type(smu):

    assert isinstance(smu.autorange, bool)

def test_correct_type(smu):

    assert isinstance(smu.autorange, int)
```
  1. Run pytest on the above script.
  2. The first test fails because an AssertiorError is raised.
  3. The second test passes.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions