Test the exceptions raised by isfinite and isinf (#21168)
Summary:
Following up ef1fdc27a3779586efad631d698cec2d6d19503f
Pull Request resolved: https://github.com/pytorch/pytorch/pull/21168
Differential Revision: D15696615
Pulled By: ezyang
fbshipit-source-id: 46904974ef3c4cb87c7a1d06871bf01543e61ef2