Skip to content

Tests failing on fresh install: TypeError in test_spi.py and test_uart.py #257

@SehajModi

Description

@SehajModi

Hi! I am setting up the development environment for GSoC. While running the tests locally on Windows, I encountered errors in the SPI and UART test modules.

It appears that SPIMaster._frequency and UART._baudrate are methods (functions), but the test code attempts to multiply/divide them directly as if they were integers. This causes the test collection to fail.

Steps to reproduce the behavior:

  1. Clone repository
  2. Install dependencies: pip install -e .
  3. Run tests: python -m pytest

Error Log

___________________________________________________________________ ERROR collecting tests/test_spi.py ____________________________________________________________________ tests\test_spi.py:33: in PWM_FERQUENCY = SPIMaster._frequency * 2 / 3 E TypeError: unsupported operand type(s) for *: 'method' and 'int'

___________________________________________________________________ ERROR collecting tests/test_uart.py ___________________________________________________________________ tests\test_uart.py:19: in PWM_FERQUENCY = UART._baudrate // 2 E TypeError: unsupported operand type(s) for //: 'method' and 'int'

Expected behavior
The tests should collect and run without TypeErrors.

Environment

  • OS: Windows
  • Python Version: 3.14.0

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions