Package Camelot :: Package camelot :: Package test :: Class ModelThreadTestCase |
[frames] | no frames]

# Class ModelThreadTestCase

source code

Base class for implementing test cases that need a running model_thread.

Nested Classes
Inherited from `unittest.TestCase`: `failureException`

Instance Methods
grab_widget(self, widget, suffix=None, subdir=None) Save a widget as a png file :... | source code
process(self) Wait until all events are processed and the queues of the model thread are empty | source code
setUp(self) Hook method for setting up the test fixture before exercising it. | source code
tearDown(self) Hook method for deconstructing the test fixture after testing it. | source code
Inherited from `unittest.TestCase`: `__call__`, `__eq__`, `__hash__`, `__init__`, `__ne__`, `__repr__`, `__str__`, `assertAlmostEqual`, `assertAlmostEquals`, `assertEqual`, `assertEquals`, `assertFalse`, `assertNotAlmostEqual`, `assertNotAlmostEquals`, `assertNotEqual`, `assertNotEquals`, `assertRaises`, `assertTrue`, `assert_`, `countTestCases`, `debug`, `defaultTestResult`, `fail`, `failIf`, `failIfAlmostEqual`, `failIfEqual`, `failUnless`, `failUnlessAlmostEqual`, `failUnlessEqual`, `failUnlessRaises`, `id`, `run`, `shortDescription` Inherited from `object`: `__delattr__`, `__format__`, `__getattribute__`, `__new__`, `__reduce__`, `__reduce_ex__`, `__setattr__`, `__sizeof__`, `__subclasshook__`

Class Variables
| images_path = ``'````'``

Properties
Inherited from `object`: `__class__`

Method Details

### grab_widget(self, widget, suffix=None, subdir=None) | source code
    Save a widget as a png file :
    :param widget: the widget to take a screenshot of
    :param suffix: string to add to the default filename of the image
    :param subdir: subdirectory of images_path in which to put the image file, defaults to
    the name of the test class
    - the name of the png file is the name of the test case, without 'test_'
    - it is stored in the directory with the same name as the class, without 'test'

### setUp(self) | source code
Hook method for setting up the test fixture before exercising it. Overrides: unittest.TestCase.setUp (inherited documentation)

### tearDown(self) | source code
Hook method for deconstructing the test fixture after testing it. Overrides: unittest.TestCase.tearDown (inherited documentation)