Skip to content

Fix TypeError in SPI/UART tests and correct frequency calculation #270

@TejasAnalyst

Description

@TejasAnalyst

Description The current tests in tests/test_spi.py and tests/test_uart.py have two issues:

A typo in the constant name PWM_FERQUENCY.

A TypeError caused by attempting to perform arithmetic operations directly on the SPIMaster._frequency and UART._baudrate methods without calling them.

Proposed Solution

Rename the constant to PWM_FREQUENCY.

Fix the logic to correctly call the methods (e.g., SPIMaster._frequency()) to retrieve the integer value instead of using the method object itself.

Avoid hardcoding the frequency to 1000 to ensure tests remain meaningful.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions