Skip to content
  • Massimiliano Culpo's avatar
    repo: generalize "swap" context manager to also accept paths · 1a8963b0
    Massimiliano Culpo authored
    The method is now called "use_repositories" and
    makes it clear in the docstring that it accepts
    as arguments either Repo objects or paths.
    
    Since there was some duplication between this
    contextmanager and "use_repo" in the testing framework,
    remove the latter and use spack.repo.use_repositories
    across the entire code base.
    
    Make a few adjustment to MockPackageMultiRepo, since it was
    stating in the docstring that it was supposed to mock
    spack.repo.Repo and was instead mocking spack.repo.RepoPath.
    1a8963b0