# How to test private / non-exported methods of a module?

**URL:** <https://discourse.julialang.org/t/how-to-test-private-non-exported-methods-of-a-module/47201>\
**Category:** General Usage\
**Tags:** testing\
**Created:** [September 24, 2020, 11:08am UTC](https://discourse.julialang.org/t/how-to-test-private-non-exported-methods-of-a-module/47201 "2020-09-24T11:08:47Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![greatpet](https://avatars.discourse-cdn.com/v4/letter/g/e495f1/32.png) [@greatpet](https://discourse.julialang.org/u/greatpet)\
**Post date:** [September 24, 2020, 11:08am UTC](https://discourse.julialang.org/t/how-to-test-private-non-exported-methods-of-a-module/47201/1 "2020-09-24T11:08:47Z")

</div>

When writing a module, I would like to test the methods as I code them up, but how do I test the methods that are not exported?

---

<div class="post-metadata">

**Author:** ![kristoffer.carlsson](https://sea2.discourse-cdn.com/julialang/user_avatar/discourse.julialang.org/kristoffer.carlsson/32/22_2.png) [@kristoffer.carlsson](https://discourse.julialang.org/u/kristoffer.carlsson)\
**Post date:** [September 24, 2020, 11:09am UTC](https://discourse.julialang.org/t/how-to-test-private-non-exported-methods-of-a-module/47201/2 "2020-09-24T11:09:42Z")

</div>

Just call them with the module prefixed `Package.func(1,2)` or bring them into the namespace `using Package: func` for example.
