fix: Missing logging in report#603
Merged
BeyondEvil merged 1 commit intopytest-dev:next-genfrom Mar 25, 2023
Merged
Conversation
BeyondEvil
commented
Mar 25, 2023
| "runningState": "not_started", | ||
| "environment": {}, | ||
| "tests": [], | ||
| "tests": defaultdict(list), |
Contributor
Author
There was a problem hiding this comment.
Made a small performance improvement to avoid having to iterate through all tests, we key them with the original nodeid.
BeyondEvil
commented
Mar 25, 2023
| self._report.add_test(data) | ||
| self._generate_report() | ||
| if self._report.add_test(data, report): | ||
| self._generate_report() |
Contributor
Author
There was a problem hiding this comment.
Only generate the report if we actually made a change (added a test in this case).
BeyondEvil
commented
Mar 25, 2023
| setManager(data) { | ||
| const collapsedCategories = [...getCollapsedCategory(), 'passed'] | ||
| const dataBlob = { ...data, tests: data.tests.map((test, index) => ({ | ||
| const dataBlob = { ...data, tests: Object.values(data.tests).flat().map((test, index) => ({ |
Contributor
Author
There was a problem hiding this comment.
This flattens (removes the nodeid key) from the JSON data.
BeyondEvil
commented
Mar 25, 2023
| formattedDuration = formatDuration < 1 ? formattedDuration.ms : formattedDuration.formatted | ||
| const resultBody = templateResult.content.cloneNode(true) | ||
| resultBody.querySelector('tbody').classList.add(resultLower) | ||
| resultBody.querySelector('tbody').id = testId |
Contributor
Author
There was a problem hiding this comment.
Added this to be able to differentiate between logs using the testId.
9e4108e to
6f5c4e0
Compare
6f5c4e0 to
63890ea
Compare
This was referenced Mar 25, 2023
Closed
BeyondEvil
added a commit
to BeyondEvil/pytest-html
that referenced
this pull request
Apr 3, 2023
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The logging output/capture was broken in the legacy report, where "teardown" logs wasn't visible in the tests log output.