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

Fix run-tests errors #1053

Closed
kocio-pl opened this issue Mar 5, 2024 · 4 comments · Fixed by #1079
Closed

Fix run-tests errors #1053

kocio-pl opened this issue Mar 5, 2024 · 4 comments · Fixed by #1079
Labels
low-hanging-fruit "Easy picks" suitable for new contributors to tackle maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers

Comments

@kocio-pl
Copy link
Contributor

kocio-pl commented Mar 5, 2024

After big refactoring run-tests fails with errors. It can run with ./run-tests --continue-on-collection-errors and there can be many things to change, but I think it would be good to have at least basic form of testing working properly out of the box.

After some plumbing I have now only 2 types of errors left, which looks to be some specific Python quirks:

  1. The file is info.py.in, not info.py:

GTG/core/datastore.py:37: in
import GTG.core.info as info
E ModuleNotFoundError: No module named 'GTG.core.info'

  1. Using from GTG.gtk.browser.modify_tags import parse_tag_list is not able to import name parse_tag_list

How can I get rid of them?

@SqAtx
Copy link
Contributor

SqAtx commented Mar 5, 2024

The first issue is interesting - I run into it locally as well, but GHA doesn't. It collects the tests as normal. See https://github.com/getting-things-gnome/gtg/actions/runs/8118410410/job/22192600382 for #1036.

As for the second one, the method has moved, so the tests will have to move as well. A temporary solution could be to remove the import and ignore the tests, which is what I had in #999. When we get a green test run, we can come back to these tests and put them in the correct place.

The good news is that there are several people working on getting a green test suite again :) You can check out #1036 and #967. That said, there are still individual test failures. I'm currently looking at fixing test_saved_search.py.

@kocio-pl
Copy link
Contributor Author

kocio-pl commented Mar 5, 2024

As for the second one, the method has moved, so the tests will have to move as well.

The problem is that it is a new location.

The good news is that there are several people working on getting a green test suite again :)

Great! 👍

@nekohayo nekohayo added low-hanging-fruit "Easy picks" suitable for new contributors to tackle maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers labels Mar 10, 2024
@kocio-pl
Copy link
Contributor Author

kocio-pl commented Apr 7, 2024

Hm, this is still not fixed - ./run-tests still fails:

collected 135 items / 3 errors / 132 selected

@SqAtx
Copy link
Contributor

SqAtx commented Apr 7, 2024

For better or for worse, we now have to run meson install before running the tests. See how GHA does it at https://github.com/getting-things-gnome/gtg/blob/master/.github/workflows/unit_tests.yml, and @picsel2 's explanation in #1036

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
low-hanging-fruit "Easy picks" suitable for new contributors to tackle maintainability Automated tests suite, tooling, refactoring, or anything that makes it easier for developers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants