summaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorTamara Dahlgren <35777542+tldahlgren@users.noreply.github.com>2019-10-29 00:25:59 -0700
committerTodd Gamblin <tgamblin@llnl.gov>2019-10-29 00:25:59 -0700
commit3cf21e6edc14e8431a0a65867a45df35aef1911e (patch)
tree26a24062ce173fc3ab8ce83c1d9450fdcd1085c3 /lib
parentaad8ea172c404b533ab011e60c0e878cc48883f1 (diff)
downloadspack-3cf21e6edc14e8431a0a65867a45df35aef1911e.tar.gz
spack-3cf21e6edc14e8431a0a65867a45df35aef1911e.tar.bz2
spack-3cf21e6edc14e8431a0a65867a45df35aef1911e.tar.xz
spack-3cf21e6edc14e8431a0a65867a45df35aef1911e.zip
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`
Diffstat (limited to 'lib')
-rw-r--r--lib/spack/spack/test/cmd/flake8.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/spack/spack/test/cmd/flake8.py b/lib/spack/spack/test/cmd/flake8.py
index b95db93364..6cad6950ba 100644
--- a/lib/spack/spack/test/cmd/flake8.py
+++ b/lib/spack/spack/test/cmd/flake8.py
@@ -45,7 +45,7 @@ def 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
# directory of Spack. Convert to absolute file paths.