In principle it is possible that some packages may rely on configuration to pass their tests. If that configuration occurs via Preferences.jl, given that Preferences is path-based it seems likely to be necessary to find and copy the LocalPreferences.toml file to the new project directory.
I don't yet have a MWE, but I have a not-yet-public package that involves communication with a SQL database, and I handle the configuration of this interaction via Preferences. The package passes tests with Pkg.test() (following a custom line in my CI.yml file that generates the right LocalPreferences) but I have not found an incantation that works with TestEnv.
In principle it is possible that some packages may rely on configuration to pass their tests. If that configuration occurs via Preferences.jl, given that Preferences is path-based it seems likely to be necessary to find and copy the LocalPreferences.toml file to the new project directory.
I don't yet have a MWE, but I have a not-yet-public package that involves communication with a SQL database, and I handle the configuration of this interaction via Preferences. The package passes tests with
Pkg.test()(following a custom line in my CI.yml file that generates the right LocalPreferences) but I have not found an incantation that works with TestEnv.