-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
Provide an alternative to --result-log #4488
Copy link
Copy link
Closed
Labels
type: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
Description
Activity
Metadata
Metadata
Assignees
Labels
type: proposalproposal for a new feature, often to gather opinions or design the API around the new featureproposal for a new feature, often to gather opinions or design the API around the new feature
After discussion in #4447 (comment), @RonnyPfannschmidt mentions he would like to provide a replacement to
--result-login the core before removing it (#3081).This potentially is an easy contribution given that we have the
resultlog.pyplugin already which can be used as a starting point.I would like for us to discuss how that "log file" will look like in this issue.
I understand the rationale is to provide a line-based log file, which can be parsed using standard tools.
I have used a log file in the past where each line was a JSON object, something like:
{"progress": 0.25, "status": "Running simulation"} {"progress": 0.30, "status": "Running simulation"} ...pytest would then write each line to the file during
pytest_runtest_logreport, likeresultlog.pydoes now.I suppose we also want to add an option to replay the tests in a log file, so users can reproduce a previous run that was saved to a log?
@RonnyPfannschmidt you also mentioned that
pytest-tapwould not be an appropriate replacement, can you elaborate on why?