Skip to content

Enable test for length of history list output outside of terminal#1659

Merged
kontura merged 2 commits intorpm-software-management:mainfrom
pkratoch:issue-2025-history-columns
Jul 25, 2025
Merged

Enable test for length of history list output outside of terminal#1659
kontura merged 2 commits intorpm-software-management:mainfrom
pkratoch:issue-2025-history-columns

Conversation

@pkratoch
Copy link
Copy Markdown
Contributor

@pkratoch pkratoch commented Apr 3, 2025

@kontura kontura self-assigned this Apr 3, 2025
@kontura
Copy link
Copy Markdown
Contributor

kontura commented Apr 4, 2025

I am not exactly sure what is causing it but the test is failing for me on fedora > 40 because there is one extra space.

I think it is caused by an outside change. I tried downgrading behave (and everything Python) to the f40 versions and then it passed again.

pkratoch added 2 commits July 21, 2025 09:51
Previously, dnf printed the history table with only the header, but no
lines, but now the output is completely empty, so it doesn't make sense
to test its length.
@pkratoch pkratoch force-pushed the issue-2025-history-columns branch from ed4a7b4 to 58189a4 Compare July 22, 2025 08:24
@pkratoch
Copy link
Copy Markdown
Contributor Author

The table width is for some reason always 0-2 characters shorter. For example, when FORCE_COLUMNS is set to 78, 79 or 80, it will be 78, when it's set to 75, 76 or 77, it will be 75. I think it's related to how the widths of the columns and paddings are calculated internally and I haven't found a way how to make the width exact, although I don't think it matters much. We can at least test that the width doesn't exceed the 80 characters. Not sure how to make it better. :/

@kontura
Copy link
Copy Markdown
Contributor

kontura commented Jul 25, 2025

I have verified the test passes locally.

@kontura kontura merged commit 91503c5 into rpm-software-management:main Jul 25, 2025
7 of 10 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