Test/dnf4.mark: make failures to parse dnf output easier to debug
The test case still fails on RHEL-10.0 Beta, even when not using dnf5,
with:
```
for line in r.stdout.splitlines():
> package, mark = line.strip().split(",")
E ValueError: not enough values to unpack (expected 2, got 1)
```
Make debugging of failures like this easier by printing the line when
the issue happens.
Signed-off-by: Tomáš Hozza <thozza@redhat.com>
This commit is contained in:
parent
a8f3a1e834
commit
52200c581d
1 changed files with 6 additions and 1 deletions
|
|
@ -557,7 +557,12 @@ class TestStages(test.TestBase):
|
|||
# Upstream bug https://github.com/rpm-software-management/dnf5/issues/709
|
||||
if not line:
|
||||
continue
|
||||
package, mark = line.strip().split(",")
|
||||
|
||||
try:
|
||||
package, mark = line.strip().split(",")
|
||||
except ValueError:
|
||||
print(f"Failed to parse line: {line}")
|
||||
raise
|
||||
|
||||
if package == "dnf":
|
||||
assert mark == "user"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue