Test package with dev-ed dependency

Package P depends on package D. I want to run the test suite of package P with a specific version of package D in the manifest. To be specific, I have D dev-ed, I want the dev-ed variant to be loaded for the test suite.

Specifically, P is CliqueTrees.jl, whose test suite I want to run with the main branch of FixedSizeArrays.jl, which is D.

However when I run the Pkg.jl test command, it says:

(@v1.12) pkg> test CliqueTrees
     Testing CliqueTrees
        Test Could not use exact versions of packages in manifest. Re-resolving dependencies

Then it proceeds to run the test suite with a released version of FixedSizeArrays.jl, which is not what I want.

This is what happens when I run test while not allowing re-resolving:

julia> using Pkg: test

julia> test("CliqueTrees"; allow_reresolve = false)
     Testing CliqueTrees
ERROR: Unsatisfiable requirements detected for package DataStructures [864edb3b]:
 DataStructures [864edb3b] log:
 ├─possible versions are: 0.9.0 - 0.19.3 or uninstalled
 ├─restricted to versions 0.19.3 by an explicit requirement, leaving only versions: 0.19.3
 └─restricted by compatibility requirements with Catlab [134e5e36] to versions: 0.17.0 - 0.18.22 — no versions left
   └─Catlab [134e5e36] log:
     ├─possible versions are: 0.2.1 - 0.17.4 or uninstalled
     ├─restricted to versions * by project [25071fe8], leaving only versions: 0.2.1 - 0.17.4
     │ └─project [25071fe8] log:
     │   ├─possible versions are: 0.0.0 or uninstalled
     │   └─project [25071fe8] is fixed to version 0.0.0
     └─restricted by compatibility requirements with CliqueTrees [60701a23] to versions: 0.16.0 - 0.17.4 or uninstalled, leaving only versions: 0.16.0 - 0.17.4
       └─CliqueTrees [60701a23] log:
         ├─possible versions are: 0.2.0 - 1.13.1 or uninstalled
         └─restricted to versions 1.13.1 by an explicit requirement, leaving only versions: 1.13.1

How to run the CliqueTrees.jl test suite with loaded desired version of FixedSizeArrays.jl?

Do you need to use Pkg.test explicitly in your actual use case?

Otherwise, you could simply activate your desired environment, with FixedSizeArrays.jl dev-ed and include("~/.julia/Packages/CliqueTrees/WhAtEvEr/test/runtests.jl") and that would run the tests, wouldn’t it?

You’d also need to add Tests to this environment