Files
pytorch/pytest.ini
Evgeni Burovski 5ed4a423de WIP / TST: allow testing torch._numpy under Dynamo (#110401)
Use conditional imports: when running under dynamo, import the original NumPy not torch._numpy. This is what we want to trace, not our implementation.

With this, the test suite passes with and without `PYTORCH_TEST_WITH_DYNAMO=1` (modulo a couple of test modules which are not meant to be compiled, e.g. `test_nep50_examples`). There are two new decorators, `x{fail,pass}ifTorchDynamo`, the `xpass` in most cases indicates a graph break and a fallback to eager for things we do not implement.

Pull Request resolved: https://github.com/pytorch/pytorch/pull/110401
Approved by: https://github.com/lezcano
2023-10-25 16:02:16 +00:00

18 lines
520 B
INI

[pytest]
addopts =
# show summary of all tests that did not pass
-rEfX
# Make tracebacks shorter
--tb=native
# capture only Python print and C++ py::print, but not C output (low-level Python errors)
--capture=sys
# don't suppress warnings, but don't shove them all to the end either
-p no:warnings
testpaths =
test
junit_logging_reruns = all
filterwarnings =
ignore:Module already imported so cannot be rewritten.*hypothesis:pytest.PytestAssertRewriteWarning
strict_xfail = True