plainbox.testing_utils - generic testing utilities¶
-
class
plainbox.testing_utils.XLongTextCompare[source]¶ Bases:
objectA helper that allows to debug failing text comparison on x-large text To use, put it before TestCase in class inheritance list.
To get a chance to observe each failure, define XLONGTEXTCOMPARE=’interactive’ and run your tests. Once you get to a failing test pdb will be started. Then you can inspect two files
/tmp/actualand/tmp/expectedfor example, with vimdiff.
-
plainbox.testing_utils.resource_json(package, pathname, exact=False)[source]¶ Like resource_string, but loaded as JSON.
Parameters: - package – name of the python package
- pathame – pathname of a file inside that package
- exact – if True, uses OrderedDict to preserve ordering
Returns: deserialized json object