Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ It lets you activate the test environment from a given package.

### Why is this useful?

This lets you run code in the test enviroment, interactively; giving you access to all your test-only dependencies.
This lets you run code in the test environment, interactively; giving you access to all your test-only dependencies.
When you run `]test` in the REPL, a new Julia process is started which activates a temporary environment containing the tested package together with all its test-only dependencies.
These can be either defined in the `[extras]` section in the package's `Project.toml` or in a separate `test/Project.toml`.
The special temporary environment is different than the plain package environment (which doesn't contain the extra test dependencies) or the `test/Project.toml` environment (which doesn't contain the package itself, and may not exist).
Expand All @@ -19,8 +19,8 @@ Julia does not offer an official mechanism to activate such an environment outsi
That's what `TestEnv.activate()` is for.

## Note on installation:
Like other developer focused tools, TestEnv.jl should not be added as a dependency of the package you are developing, but rather added to your global enviroment, so it is always available.
The easiest way to install it to the global enviroment is to start julia (without passing the `--project` argument), and then run `] add TestEnv`.
Like other developer focused tools, TestEnv.jl should not be added as a dependency of the package you are developing, but rather added to your global environment, so it is always available.
The easiest way to install it to the global environment is to start julia (without passing the `--project` argument), and then run `] add TestEnv`.


## Example
Expand Down Expand Up @@ -55,4 +55,4 @@ end
```

### See also:
- [Discourse Release Announcement](https://discourse.julialang.org/t/ann-testenv-jl-activate-your-test-enviroment-so-you-can-use-your-test-dependencies/65739)
- [Discourse Release Announcement](https://discourse.julialang.org/t/ann-testenv-jl-activate-your-test-environment-so-you-can-use-your-test-dependencies/65739)
6 changes: 3 additions & 3 deletions src/julia-1.0/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.0/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name())
outer_tmp = mktempdir()
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.1/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.1/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name())
outer_tmp = mktempdir()
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.11/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.11/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
ctx, pkgspec = ctx_and_pkgspec(pkg)
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.12/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.12/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
ctx, pkgspec = ctx_and_pkgspec(pkg)
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.13/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.13/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
ctx, pkgspec = ctx_and_pkgspec(pkg)
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.2/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.2/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name())
outer_tmp = mktempdir()
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.3/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.3/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name())
outer_tmp = mktempdir()
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.4/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.4/activate_set.jl
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""
TestEnv.activate([pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name())
ctx, pkgspec = ctx_and_pkgspec(pkg)
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.7/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.7/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg])

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name())
ctx, pkgspec = ctx_and_pkgspec(pkg)
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.8/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.8/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
ctx, pkgspec = ctx_and_pkgspec(pkg)
Expand Down
6 changes: 3 additions & 3 deletions src/julia-1.9/activate_do.jl
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
"""
TestEnv.activate(f, [pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment), and run `f()`,
then deactivate the enviroment.
This is not useful for many people: Julia is not really designed to have the enviroment
Activate the test environment of `pkg` (defaults to current environment), and run `f()`,
then deactivate the environment.
This is not useful for many people: Julia is not really designed to have the environment
being changed while you are executing code.
However, this *is* useful for anyone doing something like making a alternative to
`Pkg.test()`.
Expand Down
2 changes: 1 addition & 1 deletion src/julia-1.9/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"""
TestEnv.activate([pkg]; allow_reresolve=true)

Activate the test enviroment of `pkg` (defaults to current enviroment).
Activate the test environment of `pkg` (defaults to current environment).
"""
function activate(pkg::AbstractString=current_pkg_name(); allow_reresolve=true)
ctx, pkgspec = ctx_and_pkgspec(pkg)
Expand Down
2 changes: 1 addition & 1 deletion test/activate_set.jl
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
@test Base.invokelatest(isdefined, @__MODULE__, :Compat)
finally
Pkg.activate(orig_project_toml_path)
# No longer is enviroment active
# No longer is environment active
@test_throws ArgumentError @eval using OffsetArrays
pop!(LOAD_PATH)
@test orig_load_path == LOAD_PATH
Expand Down
Loading