pytorch
c4a6df98 - Pass any verbosity from test/run_test.py to pytest (#48204)

Commit
4 years ago
Pass any verbosity from test/run_test.py to pytest (#48204) Summary: Previously it was only possible to pass up to one [verbosity level](https://adamj.eu/tech/2019/10/03/my-most-used-pytest-commandline-flags/) to `pytest` when running a test via `test/run_test.py`. Presumably that behavior was never added because `unittest` [doesn't do anything extra](https://stackoverflow.com/a/1322648/5044950) when given more than one `--verbose` flag. This PR removes that limitation. Pull Request resolved: https://github.com/pytorch/pytorch/pull/48204 Test Plan: Make a dummy `pytest`-style file `test/test_foo.py`: ```py def test_bar(): assert 'hello\n' * 10 == 'hello\n' * 20 ``` Then add `'test_foo'` to both `TESTS` and `USE_PYTEST_LIST` in `test/run_test.py`, and run this command: ```sh test/run_test.py -vvi test_foo ``` Reviewed By: walterddr Differential Revision: D25069147 Pulled By: samestep fbshipit-source-id: 2765ee78d18cc84ea0e262520838993f9e9ee04f
Author
Parents
Loading