예제 #1
0
def do_pprint(value, verbose=False):
    """Pretty print a variable. Useful for debugging.

    With Jinja 1.2 onwards you can pass it a parameter.  If this parameter
    is truthy the output will be more verbose (this requires `pretty`)
    """
    return pformat(value, verbose=verbose)
예제 #2
0
    def test_dir(self):
        try:
            calc_info_schema = schema.get('calculation_info')

            response = self._get_response("v2_dir")
            calc_infos = json.loads(response.content)
            logging.info("Found %d calculation_info(s)"%( len(calc_infos) ) )
            logging.info( pformat( calc_infos ) )
            for ci in calc_infos:
                calc_info_schema.validate(ci)

        except ValueError, e:
            self.fail("Could not validate object:\n%s"%(e))
예제 #3
0
def do_pprint(value, verbose = False):
    return pformat(value, verbose=verbose)
예제 #4
0
def do_pprint(value, verbose=False):
    return pformat(value, verbose=verbose)