Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests and a fix for BaseStore.parent #1166

Conversation

gycsaba96
Copy link
Contributor

I wrote unit tests for BaseStore.parent. The tests revealed that calling the method with a non-existing parent_id changes the list of root elements (self.data).

The main changes are as follows:

  • add unit tests for BaseStore.parent,
  • ensure that the store is unchanged when called with invalid IDs,
  • add helpful error messages to the exceptions.

- add unit tests for BaseStore.parent
- ensure that the store is unchanged when called with invalid IDs
- add helpful error messages to the exceptions
@diegogangl diegogangl added bug enhancement maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers labels Dec 30, 2024
@diegogangl
Copy link
Contributor

Ah that was before I understood the importance of keeping try/excepts 1-line long :)
LGTM, thanks!

@diegogangl diegogangl merged commit 77fc73a into getting-things-gnome:master Dec 30, 2024
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug enhancement maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants