fossasia / fossasia/pslab-python
Tests failing on fresh install: TypeError in test_spi.py and test_uart.py
- Dominant language
- Python
- Stars
- 1.6k
- Forks
- 242
- PR merge metrics
- No merged PRs in 30d
Description
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
Contributor guide
Assessment
This issue has not been assessed yet.