summaryrefslogtreecommitdiff
path: root/.flake8_packages
diff options
context:
space:
mode:
authorTodd Gamblin <tgamblin@llnl.gov>2020-04-23 18:21:49 -0700
committerGitHub <noreply@github.com>2020-04-23 18:21:49 -0700
commitc6ada206af08f66817fe1c2aeeee8f45f92a192e (patch)
tree1ca858e8d821f8f436a1f6b5f811d958b2b01f72 /.flake8_packages
parent433a0b243ffa97add96bc0f51477c4bda3449c12 (diff)
downloadspack-c6ada206af08f66817fe1c2aeeee8f45f92a192e.tar.gz
spack-c6ada206af08f66817fe1c2aeeee8f45f92a192e.tar.bz2
spack-c6ada206af08f66817fe1c2aeeee8f45f92a192e.tar.xz
spack-c6ada206af08f66817fe1c2aeeee8f45f92a192e.zip
tests: each mock package now has its own class (#16157)
Packages in Spack are classes, and we need to be able to execute class methods on mock packages. The previous design used instances of a single MockPackage class; this version gives each package its own class that can spider depenencies. This allows us to implement class methods like `possible_dependencies()` on mock packages. This design change moves mock package creation into the `MockPackageMultiRepo`, and mock packages now *must* be created from a repo. This is required for us to mock `possible_dependencies()`, which needs to be able to get dependency packages from the package repo. Changes include: * `MockPackage` is now `MockPackageBase` * `MockPackageBase` instances must now be created with `MockPackageMultiRepo.add_package()` * add `possible_dependencies()` method to `MockPackageBase` * refactor tests to use new code structure * move package mocking infrastructure into `spack.util.mock_package`, as it's becoming a more sophisticated class and it gets lots in `conftest.py`
Diffstat (limited to '.flake8_packages')
0 files changed, 0 insertions, 0 deletions