Make SkipInfo with expected_failure an XFAIL (#63481)
authorHeitor Schueroff <heitorschueroff@fb.com>
Wed, 18 Aug 2021 18:30:44 +0000 (11:30 -0700)
committerFacebook GitHub Bot <facebook-github-bot@users.noreply.github.com>
Wed, 18 Aug 2021 18:36:18 +0000 (11:36 -0700)
commit50a3b6a6a81395106cbbf0f2a80885d4d43a614f
tree0313bf23cc758023a903c557b1319423dc7bc7e8
parent2f615f63135e834499b5d11a4fbced91d70913cc
Make SkipInfo with expected_failure an XFAIL (#63481)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/63481

This PR changes the SkipInfo decorators to use unittest.expectedFailure so that the test reports as XFAIL as opposed to PASSED.

Note that changing the expectedFailure here https://github.com/pytorch/pytorch/blob/30e1c74dc19ae2b622b46ebcdb7972c42775ac80/torch/testing/_internal/common_device_type.py#L879 to an XFAIL is not possible because the decision of whether to decorate is delayed until the wrapper function is called.

fixes https://github.com/pytorch/pytorch/issues/63363

Test Plan: Imported from OSS

Reviewed By: ZolotukhinM

Differential Revision: D30397154

Pulled By: heitorschueroff

fbshipit-source-id: c5e4911969ad8667763eec4203dbbc6a51178592
torch/testing/_internal/common_methods_invocations.py