plainbox.testing_utils - generic testing utilities

class plainbox.testing_utils.XLongTextCompare[source]

Bases: object

A 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/actual and /tmp/expected for example, with vimdiff.

assertEqual(actual, expected)[source]
plainbox.testing_utils.resource_json(package, pathname, exact=False)[source]

Like resource_string, but loaded as JSON.

  • package – name of the python package
  • pathame – pathname of a file inside that package
  • exact – if True, uses OrderedDict to preserve ordering

deserialized json object

comments powered by Disqus