Changes between Version 6 and Version 7 of TracDev/UnitTests
- Timestamp:
- May 11, 2009, 3:48:47 AM (15 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/UnitTests
v6 v7 45 45 The module [source:/trunk/trac/test.py#latest trac.test] contains a couple of functions and classes that can help writing unit tests. In particular, it provides an {{{InMemoryDatabase}}} class that can be used to test functionality that requires database access, without having to create an actual database on disk. Also there's a very simple factory for [http://c2.com/cgi/wiki?MockObject mock objects], which you can use to create quick substitutes of the "real" objects for testing. 46 46 47 == Optional Dependencies == 48 Some unit tests seem to depend on: 49 * [http://twill.idyll.org/ twill] 50 * [http://pytz.sourceforge.net/ pytz] 51 * [http://pygments.org/ Pygments] 52 These can be installed with easy_install 53 {{{ 54 easy_install twill 55 easy_install pytz 56 easy_install Pygments 57 }}} 58 59 If these dependencies are not present, certain unit and functional tests will be skipped. 60 47 61 ---- 48 62 See also: TracDev