Skip to content

Test run failures #8

@sjmf

Description

@sjmf

Tests are run using python -m pytest. However, several of the unit tests are failing at the moment due to difficulty patching the modules they use.

Most tests run correctly when running the single file, e.g. python -m pytest tests/backend/test_keyboard.py. However, due to patching requirements for the modules serial, pynput and tkinter (these being the 3 giving the most trouble), the tests can fail when run as a suite in concert.

PyTest's behaviour is that once a module has been loaded, it can no longer be patched. This leads to a situation where tests following can receive different system state dependent on what ran previously.

Test run report to follow.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions