Skip to content

Conversation

@Earth1283
Copy link
Owner

This commit introduces a new test file, tests/test_main.py, which adds comprehensive unit tests for the main.py module. The new tests cover all the functions in main.py, including run_startup_tasks, handle_password_authentication, create_password, application_hub, run_onboarding, check_connection, and pass_exsists.

The tests make extensive use of mocking to isolate the functions from their dependencies, ensuring that the tests are robust and focused on the logic of the functions themselves.

In addition to adding new tests, this commit also includes a bug fix for the pass_exsists function, which was previously reading from the password file twice. A new test case has been added to cover this fix.

Finally, the .coverage file has been added to the .gitignore file to prevent coverage reports from being committed to the repository.

This commit introduces a new test file, `tests/test_main.py`, which adds comprehensive unit tests for the `main.py` module. The new tests cover all the functions in `main.py`, including `run_startup_tasks`, `handle_password_authentication`, `create_password`, `application_hub`, `run_onboarding`, `check_connection`, and `pass_exsists`.

The tests make extensive use of mocking to isolate the functions from their dependencies, ensuring that the tests are robust and focused on the logic of the functions themselves.

In addition to adding new tests, this commit also includes a bug fix for the `pass_exsists` function, which was previously reading from the password file twice. A new test case has been added to cover this fix.

Finally, the `.coverage` file has been added to the `.gitignore` file to prevent coverage reports from being committed to the repository.
@Earth1283 Earth1283 merged commit 7e71394 into main Oct 19, 2025
2 of 5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants