Asserting pytest log output makes it hard to diagnose errors #1085
Labels
No labels
Affects/CppNix
Affects/Nightly
Affects/Only nightly
Affects/Stable
Area/build-packaging
Area/cli
Area/evaluator
Area/fetching
Area/flakes
Area/language
Area/lix ci
Area/nix-eval-jobs
Area/profiles
Area/protocol
Area/releng
Area/remote-builds
Area/repl
Area/repl/debugger
Area/store
awaiting
author
awaiting
contributors
bug
Context
contributors
Context
drive-by
Context
maintainers
Context
RFD
crash 💥
Cross Compilation
devx
docs
Downstream Dependents
E/easy
E/hard
E/help wanted
E/reproducible
E/requires rearchitecture
Feature/S3
imported
Language/Bash
Language/C++
Language/NixLang
Language/Python
Language/Rust
Needs Langver
OS/Linux
OS/macOS
performance
regression
release-blocker
stability
Status
blocked
Status
invalid
Status
postponed
Status
wontfix
testing
testing/flakey
Topic/Large Scale Installations
ux
No milestone
No project
No assignees
2 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
lix-project/lix#1085
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Describe the bug
Given the following error in CI: https://buildkite.com/lix-project/lix/builds/7221#019b4856-8559-45ac-a8a0-f13c59ce4fc0
The failure was a mistake on my side in https://gerrit.lix.systems/c/lix/+/4796?tab=checks
However, it seems unnecessarily painful to investigate assertion errors like
especially given that pytest tries very hard to make assertion errors understandable.
It's also debatable whether this should fail in this case: the test still passed, however a warning was logged before reporting the test to be passed, so strictly speaking, the test-case failed even though the code is valid (and the problem lies somewhere else). If we want to prevent
Nonein the env, we should fail hard one place or another.Additionally, I question that the output from pytest is supposed to be machine-readable and thus sufficiently stable.
Steps To Reproduce
n/a
Expected behavior
Use something like https://docs.pytest.org/en/7.1.x/how-to/output.html#creating-junitxml-format-files as format to parse when having to assert if a pytest test passed (assuming that this is a legit use-case as we're testing a test library here).
nix --versionoutputObservable on
4d67200b80.Additional context
cc @commentatorforall
.... i see the frustration and unreadability.
No, the current output is not supposed to be machine readable, but human readable.
In the future, we want to use pytest-tap to make things machine readable and also integrate it into meson better, but there's an open meson bug preventing us from doing so. While yes, the test should technically have passed, imo it still shouldn't as it not throws a new warning it previously didn't => unintentional change => either update the exected output or fix the warning
potentially won't-fix or status/blocked as otoh this is kinda intended as-is, but would be fixed if we could use pytest-tap instead (which is blocked on the upstream meson issue which has been open for three years, with a poke last year