There are numerous plugins on trac-hacks that have unittest based
tests.  Here are some handy starting points for exploration.

http://trac-hacks.org/browser/accountmanagerplugin/trunk/acct_mgr/tests
http://trac-hacks.org/browser/announcerplugin/0.11/announcerplugin/tests
http://trac-hacks.org/browser/estimationtoolsplugin/trunk/estimationtools/tests
http://trac-hacks.org/browser/svnauthzadminplugin/0.11/svnauthz_test
http://trac-hacks.org/browser/usermanagerplugin/0.11/tracusermanager/tests
http://trac-hacks.org/browser/xmlrpcplugin/trunk/tracrpc/tests

And of course Trac itself has a large number of tests as well.

http://trac.edgewall.org/browser/trunk/trac/tests
http://trac.edgewall.org/browser/trunk/trac/admin/tests
http://trac.edgewall.org/browser/trunk/trac/db/tests
http://trac.edgewall.org/browser/trunk/trac/mimeview/tests
http://trac.edgewall.org/browser/trunk/trac/prefs/tests
http://trac.edgewall.org/browser/trunk/trac/ticket/tests
http://trac.edgewall.org/browser/trunk/trac/timeline/tests
http://trac.edgewall.org/browser/trunk/trac/util/tests
http://trac.edgewall.org/browser/trunk/trac/versioncontrol/tests
http://trac.edgewall.org/browser/trunk/trac/web/tests
http://trac.edgewall.org/browser/trunk/trac/wiki/tests

For mocking existing classes (which helps keeps your tests from
needing a full environment to run against), take a look at the Mock
class in test.py

http://trac.edgewall.org/browser/trunk/trac/test.py

On Mon, Jul 20, 2009 at 6:47 AM, Olemis Lang<[email protected]> wrote:
>
> This time my question is very simple (even if `simple` is relative :P) :
>
> - Is it possible to write and run tests for Trac plugins ?
> - How ? I mean what are the best practices, procedures, steps (or
>  whatever ;o) to do it.
> - Does any of those integrates with `unittest` ?
>
> Thnx in advance !
>
> --
> Regards,
>
> Olemis.
>
> Blog ES: http://simelo-es.blogspot.com/
> Blog EN: http://simelo-en.blogspot.com/
>
> Featured article:
>
> >
>

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Trac 
Users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/trac-users?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to