Package testoob :: Module extracting
[show private | hide private]
[frames | no frames]

Module testoob.extracting

Extracting tests from a test suite
Function Summary
  full_extractor(suite, recursive_iterator)
Extract the text fixtures from a suite.
  glob(pattern)
Filter tests based on a matching glob pattern to their id.
  predicate(pred)
  randomize(seed)
Randomize the order of the tests
  regex(regex)
Filter tests based on matching a regex to their id.
  repeat(num_times)
Repeat each test a number of times
  suite_iter(suite)
suite_iter(suite) -> an iterator on its direct sub-suites.
  _breadth_first(tree, children)
Traverse the nodes of a tree in breadth-first order.
  _irandomize(iterable, seed)
Randomize the iterable.
  _irepeat_items(num_times, iterable)
  _iterable_decorator(func)

Variable Summary
dict number_suffixes = {1: 'st', 2: 'nd', 3: 'ed'}

Function Details

full_extractor(suite, recursive_iterator=<function _breadth_first at 0x402d6c34>)

Extract the text fixtures from a suite. Descends recursively into sub-suites.

glob(pattern)

Filter tests based on a matching glob pattern to their id. Matching is performed with fnmatch.fnmatchcase

randomize(seed=None)

Randomize the order of the tests

regex(regex)

Filter tests based on matching a regex to their id. Matching is performed with re.search

repeat(num_times)

Repeat each test a number of times

suite_iter(suite)

suite_iter(suite) -> an iterator on its direct sub-suites. For compatibility with Python versions before 2.4

_breadth_first(tree, children=<built-in function iter>)

Traverse the nodes of a tree in breadth-first order. The first argument should be the tree root; children should be a function taking as argument a tree node and returning an iterator of the node's children.

_irandomize(iterable, seed=None)

Randomize the iterable.

Note: this evaluates the entire iterable to a sequence in memory, use this when this isn't an issue

Variable Details

number_suffixes

Type:
dict
Value:
{1: 'st', 2: 'nd', 3: 'ed'}                                            

Generated by Epydoc 2.1 on Sun Dec 3 15:27:57 2006 http://epydoc.sf.net