Changes between Version 2 and Version 3 of TracDev/UnitTests
- Timestamp:
- Dec 15, 2005, 9:40:56 AM (18 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
TracDev/UnitTests
v2 v3 14 14 Assuming the current working directory is where you checked out the Trac code from the SubversionRepository. 15 15 16 This will run all the unit tests, but you can also run only those tests for a specific package or module. For example, to run the unit tests for the {{{trac.versioncontrol}}} 16 This will run all the unit tests, but you can also run only those tests for a specific package or module. For example, to run the unit tests for the {{{trac.versioncontrol}}} package, execute: 17 17 {{{ 18 18 $ PYTHONPATH=. trac/versioncontrol/tests/__init__.py … … 33 33 If you're adding a new module, or you want to add tests for a module that doesn't have any unit tests yet, you'll need to create a new Python module for the unit tests. 34 34 35 For example, say you want to add tests for the module {{{trac.foo}}} (which maps to {{{trac/foo.py}}}). You'll need to create a new module at {{{trac/tests/foo.py}}} and put the tests there. Also, you'll have to edit the {{{__init__.py}}} in the {{{tests}}} package so that you'renew unit tests get executed with the others.35 For example, say you want to add tests for the module {{{trac.foo}}} (which maps to {{{trac/foo.py}}}). You'll need to create a new module at {{{trac/tests/foo.py}}} and put the tests there. Also, you'll have to edit the {{{__init__.py}}} in the {{{tests}}} package so that your new unit tests get executed with the others. 36 36 37 37 == Utility code for unit tests ==