# test cases for modules

**URL:** <https://forum.ansible.com/t/test-cases-for-modules/12394>\
**Category:** Ansible Project\
**Created:** [February 21, 2013, 1:33am UTC](https://forum.ansible.com/t/test-cases-for-modules/12394 "2013-02-21T01:33:24Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Yves\_Dorfsman](https://avatars.discourse-cdn.com/v4/letter/y/9de0a6/32.png) [@Yves\_Dorfsman](https://forum.ansible.com/u/Yves_Dorfsman)\
**Post date:** [February 21, 2013, 1:33am UTC](https://forum.ansible.com/t/test-cases-for-modules/12394/1 "2013-02-21T01:33:24Z")

</div>

Is there a way to split test cases for modules away from TestRunner.py?

The file is already rather large, and I am adding cases for lineinfile. Each case adds a dozen of lines or so, and I already have 7 or 8 of them.

Also, how can I run just one function out of the whole TestRunner, instead of running it entirely every time?

Thanks.

---

<div class="post-metadata">

**Author:** ![Michael\_DeHaan](https://avatars.discourse-cdn.com/v4/letter/m/c4cdca/32.png) [@Michael\_DeHaan](https://forum.ansible.com/u/Michael_DeHaan)\
**Post date:** [February 21, 2013, 4:39am UTC](https://forum.ansible.com/t/test-cases-for-modules/12394/2 "2013-02-21T04:39:25Z")

</div>

Yes, we can have multiple test loaders. Just takes some refactoring  
to make them be able to share some common glue code.
