# Testing modifications to Base

**URL:** https://discourse.julialang.org/t/testing-modifications-to-base/33063
**Category:** General Usage
**Created:** [January 7, 2020, 2:39pm UTC](https://discourse.julialang.org/t/testing-modifications-to-base/33063 "2020-01-07T14:39:03Z")
**Posts on this page:** 6
**Page:** 1

<div class="post-metadata">

### Author: ![tro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tro3/32/12355_2.png) [@tro3](https://discourse.julialang.org/u/tro3)
#### Post date: [January 7, 2020, 2:39pm UTC](https://discourse.julialang.org/t/testing-modifications-to-base/33063/1 "2020-01-07T14:39:03Z")

</div>

Do I recall on one of these threads that there is a way to easily test Base modifications without rebuilding Julia? Can’t find it through search, so maybe my memory is off…

---

<div class="post-metadata">

### Author: ![ffevotte](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/ffevotte/32/6587_2.png) [@ffevotte](https://discourse.julialang.org/u/ffevotte)
#### Post date: [January 7, 2020, 2:55pm UTC](https://discourse.julialang.org/t/testing-modifications-to-base/33063/2 "2020-01-07T14:55:37Z")

</div>

What kind of modifications do you have in mind?

You can easily override any method definition you want without doing anything special (piracy is easy!):

```julia
Base.+(x::Int, y::Int) = 42

```

For larger chunks of code, something you might want to do is put everything you want to override in a file (maybe by copy-pasting some original `Base` source code and modifying it), then

```julia
Base.include("overrides.jl")

```

The source code will then be evaluated within the `Base` module.

---

<div class="post-metadata">

### Author: ![tro3](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tro3/32/12355_2.png) [@tro3](https://discourse.julialang.org/u/tro3)
#### Post date: [January 7, 2020, 2:59pm UTC](https://discourse.julialang.org/t/testing-modifications-to-base/33063/3 "2020-01-07T14:59:37Z")

</div>

I want to test out a background-threading mod for [https://github.com/JuliaLang/julia/issues/34267](https://github.com/JuliaLang/julia/issues/34267). Thanks for the help!

---

<div class="post-metadata">

### Author: ![affans](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/affans/32/11911_2.png) [@affans](https://discourse.julialang.org/u/affans)
#### Post date: [January 7, 2020, 3:25pm UTC](https://discourse.julialang.org/t/testing-modifications-to-base/33063/4 "2020-01-07T15:25:14Z")

</div>

I had to make some changes in the `Distributed` module some time ago. I did this by `@eval Distributed function ... end `

---

<div class="post-metadata">

### Author: ![Tamas\_Papp](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tamas_papp/32/25949_2.png) [@Tamas\_Papp](https://discourse.julialang.org/u/Tamas_Papp)
#### Post date: [January 7, 2020, 3:35pm UTC](https://discourse.julialang.org/t/testing-modifications-to-base/33063/5 "2020-01-07T15:35:03Z")

</div>

Revise works, but you have to ask for this explicitly:

[https://timholy.github.io/Revise.jl/stable/#What-Revise-can-track-1](https://timholy.github.io/Revise.jl/stable/#What-Revise-can-track-1)

---

<div class="post-metadata">

### Author: ![tim.holy](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/tim.holy/32/52_2.png) [@tim.holy](https://discourse.julialang.org/u/tim.holy)
#### Post date: [January 7, 2020, 4:45pm UTC](https://discourse.julialang.org/t/testing-modifications-to-base/33063/6 "2020-01-07T16:45:55Z")

</div>

Moreover, Keno recently added test targets that use Revise, e.g., `make test-revise-reducedim` from the unix prompt.
