New tests can be added to WAchecker by writing Python files and
placing them into one of the directories defined in the
test_directories
variable in config.py. Because tests
must be loaded before test sets are defined, the following rule is
defined to distinguish between test source files and test set source
files: Python files whose names start with lowercase letters contain
tests, while Python files whose names start with capital letters
contain test sets.
Each test is a subclass of the wachecker.test.Test
class. The
following class attributes should be redefined in each new test class:
_name
_description
_url
_state
wachecker.test.Implementation_State
constants, usually
wachecker.test.Implementation_State.COMPLETE
.
_version
The test functionality is implemented in the _run (self,
document)
method (don't redefine the public run
method!). The
method must return a list of wachecker.test.Issue
instances
(for more information about them, see The Issue Class).
Note the module wachecker.test
contains several customized
wachecker.test.Test
subclasses which you can use for writing
tests. Often you can use them and redefine their specialized methods
instead of writing your own _run
methods. Look into source
code of tests for examples.
All loaded test are placed into wachecker.test
module.