# Downloading files in \`runtests.jl\`

**URL:** https://discourse.julialang.org/t/downloading-files-in-runtests-jl/65332
**Category:** Package Management
**Tags:** question
**Created:** [July 26, 2021, 8:49pm UTC](https://discourse.julialang.org/t/downloading-files-in-runtests-jl/65332 "2021-07-26T20:49:56Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![markmbaum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/markmbaum/32/32745_2.png) [@markmbaum](https://discourse.julialang.org/u/markmbaum)
#### Post date: [July 26, 2021, 8:49pm UTC](https://discourse.julialang.org/t/downloading-files-in-runtests-jl/65332/1 "2021-07-26T20:49:56Z")

</div>

It would be really useful to download and use some data files when testing my package. The files don’t need to be part of the package, just for testing. Using `Downloads.download` inside the `runtests.jl` script seems to work fine. I can download the files to temporary locations from a Dropbox link and use them for tests. Should I be doing this some other way?

---

<div class="post-metadata">

### Author: ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)
#### Post date: [July 27, 2021, 6:49am UTC](https://discourse.julialang.org/t/downloading-files-in-runtests-jl/65332/2 "2021-07-27T06:49:24Z")

</div>

Why not put the data directly in the tests folder, so it’s version controlled with the package? Or do you need huge files?

---

<div class="post-metadata">

### Author: ![markmbaum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/markmbaum/32/32745_2.png) [@markmbaum](https://discourse.julialang.org/u/markmbaum)
#### Post date: [July 27, 2021, 11:26am UTC](https://discourse.julialang.org/t/downloading-files-in-runtests-jl/65332/3 "2021-07-27T11:26:28Z")

</div>

The files are ~a few MB, but I could make them even smaller. If they go into the `tests` folder, can I read them from `runtests.jl` without any extra path elements?

---

<div class="post-metadata">

### Author: ![gustaphe](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/gustaphe/32/18174_2.png) [@gustaphe](https://discourse.julialang.org/u/gustaphe)
#### Post date: [July 27, 2021, 11:33am UTC](https://discourse.julialang.org/t/downloading-files-in-runtests-jl/65332/4 "2021-07-27T11:33:16Z")

</div>

Yup. Checking with `println(pwd())` from `runtests` shows that it’s run parked in `Package/test/`. Loading a file from in there should work fine.

---

<div class="post-metadata">

### Author: ![markmbaum](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/markmbaum/32/32745_2.png) [@markmbaum](https://discourse.julialang.org/u/markmbaum)
#### Post date: [July 27, 2021, 11:34am UTC](https://discourse.julialang.org/t/downloading-files-in-runtests-jl/65332/5 "2021-07-27T11:34:23Z")

</div>

Ok that seems like a good way to keep the files with the scripts 👍.
