bugfix: fix spack spec --yaml

- repo membership test was broken by the refactor of spack/__init__.py

- refactor singleton so that 'spec in repo' works again for `spack.repo.path`

- fix spec command and add basic tests for `spack spec` and `spack spec --yaml`
This commit is contained in:
Todd Gamblin
2018-07-24 10:30:46 -07:00
parent 6ba1c82858
commit fdcaf5c4c8
3 changed files with 58 additions and 1 deletions

View File

@@ -558,6 +558,12 @@ def __getattr__(self, name):
def __getitem__(self, name):
return self.instance[name]
def __contains__(self, element):
return element in self.instance
def __iter__(self):
return iter(self.instance)
def __str__(self):
return str(self.instance)