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

comps: add get_base() to {Group,Environment}{,Query} #1722

Merged
merged 2 commits into from
Oct 7, 2024

Conversation

gotmax23
Copy link
Contributor

This mirrors the similar classes in libdnf5::rpm that provide the same methods. This will help fedrq implement group querying functionality.

This mirrors the similar classes in libdnf5::rpm that provide the same methods.
This will help fedrq implement group querying functionality.
@@ -24,8 +24,10 @@
class TestCompsIterators(base_test_case.BaseTestCase):
def test_group_query_iterable(self):
query = libdnf5.comps.GroupQuery(self.base)
self.assertIsInstance(query.get_base().get(), libdnf5.base.Base)
_ = [grp.get_groupid() for grp in query]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I wanted to test get_base() on the Group/Environment classes, as well, but this test is broken and doesn't actually contain anything in the query.

Copy link
Contributor

@kontura kontura Oct 4, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indeed, can I please ask you to fix both of them (test_group_query_iterable and test_environment_query_iterable)?

Adding

self.add_repo_repomd("repomd-comps-core")

as the first line of the tests should do the trick.

Also I think asserting that the query size is non zero would good.

Otherwise it look good.
Thank you.

@kontura kontura self-assigned this Oct 4, 2024
Check that get_base() works properly in the Python bindings and that the
query is not empty.
@kontura
Copy link
Contributor

kontura commented Oct 7, 2024

Thank you!

@kontura kontura added this pull request to the merge queue Oct 7, 2024
Merged via the queue into rpm-software-management:main with commit 0061510 Oct 7, 2024
16 of 20 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