Skip to content
Merged
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
2 changes: 1 addition & 1 deletion can/interfaces/vector/__init__.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
"""
"""

from .canlib import VectorBus
from .canlib import VectorBus, VectorChannelConfig
from .exceptions import VectorError
25 changes: 24 additions & 1 deletion test/test_vector.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,13 @@
import pytest

import can
from can.interfaces.vector import canlib, xldefine, xlclass, VectorError
from can.interfaces.vector import (
canlib,
xldefine,
xlclass,
VectorError,
VectorChannelConfig,
)


class TestVectorBus(unittest.TestCase):
Expand Down Expand Up @@ -296,6 +302,23 @@ def test_vector_error_pickle(self) -> None:
raise exc_unpickled


class TestVectorChannelConfig:
def test_attributes(self):
assert hasattr(VectorChannelConfig, "name")
assert hasattr(VectorChannelConfig, "hwType")
assert hasattr(VectorChannelConfig, "hwIndex")
assert hasattr(VectorChannelConfig, "hwChannel")
assert hasattr(VectorChannelConfig, "channelIndex")
assert hasattr(VectorChannelConfig, "channelMask")
assert hasattr(VectorChannelConfig, "channelCapabilities")
assert hasattr(VectorChannelConfig, "channelBusCapabilities")
assert hasattr(VectorChannelConfig, "isOnBus")
assert hasattr(VectorChannelConfig, "connectedBusType")
assert hasattr(VectorChannelConfig, "serialNumber")
assert hasattr(VectorChannelConfig, "articleNumber")
assert hasattr(VectorChannelConfig, "transceiverName")


def xlGetApplConfig(
app_name_p: ctypes.c_char_p,
app_channel: ctypes.c_uint,
Expand Down