Package translate :: Package filters :: Module checks :: Class UnitChecker

[hide private]
[frames] | no frames]

# Class UnitChecker

source code

Parent Checker class which does the checking based on functions available in derived classes.

Instance Methods | [hide private]

__init__(self, checkerconfig=None, excludefilters=None, limitfilters=None, errorhandler=None) x.__init__(...) initializes x; see x.__class__.__doc__ for signature | source code

getfilters(self, excludefilters=None, limitfilters=None) returns dictionary of available filters, including/excluding those in the given lists | source code

setconfig(self, config) sets the accelerator list | source code

setsuggestionstore(self, store) Sets the filename that a checker should use for evaluating suggestions. | source code

filtervariables(self, str1) filter out variables from str1 | source code

removevariables(self, str1) remove variables from str1 | source code

filteraccelerators(self, str1) filter out accelerators from str1 | source code

filteraccelerators_by_list(self, str1, acceptlist=None) filter out accelerators from str1 | source code

filterwordswithpunctuation(self, str1) replaces words with punctuation with their unpunctuated equivalents | source code

filterxml(self, str1) filter out XML from the string so only text remains | source code

run_test(self, test, unit) Runs the given test on the given unit. | source code

run_filters(self, unit) run all the tests in this suite, return failures as testname, message_or_exception | source code

Inherited from `object`: `__delattr__`, `__getattribute__`, `__hash__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__repr__`, `__setattr__`, `__str__`

Class Variables | [hide private]

| preconditions = `{}`

Properties | [hide private]

Inherited from `object`: `__class__`

Method Details | [hide private]

### __init__(self, checkerconfig=None, excludefilters=None, limitfilters=None, errorhandler=None)
(Constructor)

source code

x.__init__(...) initializes x; see x.__class__.__doc__ for signature

Overrides: object.__init__
  (inherited documentation)

### run_test(self, test, unit)

source code

Runs the given test on the given unit.

Note that this can raise a FilterFailure as part of normal operation