diff options
author | Gregory Becker <becker33@llnl.gov> | 2016-05-19 09:53:49 -0700 |
---|---|---|
committer | Gregory Becker <becker33@llnl.gov> | 2016-05-19 09:53:49 -0700 |
commit | 19c8a52fe1c25639c47620bc07f0824c59c921f7 (patch) | |
tree | 455183d40f3f0315e123017acb055fa1814dc918 /lib | |
parent | 63459ab0c78512906c35c5d5f9fbd5a072a3203a (diff) | |
download | spack-19c8a52fe1c25639c47620bc07f0824c59c921f7.tar.gz spack-19c8a52fe1c25639c47620bc07f0824c59c921f7.tar.bz2 spack-19c8a52fe1c25639c47620bc07f0824c59c921f7.tar.xz spack-19c8a52fe1c25639c47620bc07f0824c59c921f7.zip |
fixed spec syntax test
Diffstat (limited to 'lib')
-rw-r--r-- | lib/spack/spack/test/spec_syntax.py | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/lib/spack/spack/test/spec_syntax.py b/lib/spack/spack/test/spec_syntax.py index c4e4c9cdfe..ae19de177b 100644 --- a/lib/spack/spack/test/spec_syntax.py +++ b/lib/spack/spack/test/spec_syntax.py @@ -58,7 +58,7 @@ class SpecSyntaxTest(unittest.TestCase): # ================================================================================ # Parse checks # ================================================================================ - def check_parse(self, expected, spec=None): + def check_parse(self, expected, spec=None, remove_arch=True): """Assert that the provided spec is able to be parsed. If this is called with one argument, it assumes that the string is canonical (i.e., no spaces and ~ instead of - for variants) and that it @@ -70,6 +70,13 @@ class SpecSyntaxTest(unittest.TestCase): if spec is None: spec = expected output = spack.spec.parse(spec) + + # Remove architectures that get added by parser. + if remove_arch: + for spec in output: + for s in spec.traverse(): + s.architecture = None + parsed = (" ".join(str(spec) for spec in output)) self.assertEqual(expected, parsed) |