Repository navigation
[release/2.14] Make test/conftest.py LogXMLReruns compatible with pytest 9.2 - #3935
Open
amd-maradosa wants to merge 1 commit into
Open
amd-maradosa wants to merge 1 commit into
amd-maradosa wants to merge 1 commit into
Conversation
…est 9.2 pytest 9.2 keys LogXML.node_reporters by a NodeId object instead of the string nodeid. LogXMLReruns.node_reporter kept a copy of the old pytest code that stored reporters under the string key, so LogXML.finalize fails with KeyError at the first test's teardown and every test module aborts after one case when --junit-xml-reruns is used. Delegate to LogXML.node_reporter so pytest builds the key, then switch the reporter's class to _NodeReporterReruns. Only the test/conftest.py part of the upstream change applies here: release/2.14 has no TestJunitXml tests, and the inductor benchmark pytest pin that upstream reverts was never added to this branch. Upstream: pytorch#202390 (cherry picked from commit 15e3725)
This branch has not been deployed
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.
Cherry-pick of upstream pytorch#202390 (15e3725).
With pytest 9.2,
LogXML.node_reportersis keyed by aNodeIdobject instead of the string nodeid.LogXMLReruns.node_reporterintest/conftest.pykept a copy of the old pytest code and stored reporters under the string key, soLogXML.finalizeraisesKeyErrorat the first test's teardown. With--junit-xml-reruns, every test module exits with code 3 after one case:The fix delegates to
LogXML.node_reporterso pytest builds the key, then switches the reporter's class to_NodeReporterReruns.Only the
test/conftest.pypart of the upstream commit is included. This branch has noTestJunitXmltests, and the inductor benchmark pytest pin that upstream reverts was never added here.