bugfix: make spack -d test test_changed_files work (#13229)

The `test_changed_files` in `test/cmd/flake8.py` was failing because it calls
`ArgumentParser.parse_args()` without arguments.  Normally that would just
parse `sys.argv` but it seems to fail because of something in either `spack test`
or `pytest`.  Call it with an empty array so that it doesn't try to touch`sys.argv`
at all.

- [x] allow `-d` spack option for `test_changed_files`
This commit is contained in:
Tamara Dahlgren 2019-10-29 00:25:59 -07:00 committed by Todd Gamblin
parent aad8ea172c
commit 3cf21e6edc

View file

@ -45,7 +45,7 @@ def flake8_package():
def test_changed_files(parser, flake8_package): def test_changed_files(parser, flake8_package):
args = parser.parse_args() args = parser.parse_args([])
# changed_files returns file paths relative to the root # changed_files returns file paths relative to the root
# directory of Spack. Convert to absolute file paths. # directory of Spack. Convert to absolute file paths.