Example #1
0
def assert_dumps(root, schema):
    first = dumps(root)
    second = dedent(schema).strip() + '\n'
    if first != second:
        msg = ('Dumped schema mismatches:\n\n{}'.format('\n'.join(
            difflib.ndiff(first.splitlines(), second.splitlines()))))
        raise AssertionError(msg)
Example #2
0
 def assertDumps(self, root, schema):
     first = dumps(root)
     second = dedent(schema).strip() + '\n'
     if first != second:
         msg = ('Dumped schema mismatches:\n\n{}'.format('\n'.join(
             difflib.ndiff(first.splitlines(), second.splitlines()))))
         raise self.failureException(msg)
Example #3
0
 def assertDumps(self, root, schema):
     first = dumps(root)
     second = dedent(schema).strip() + '\n'
     if first != second:
         msg = ('Dumped schema mismatches:\n\n{}'
                .format('\n'.join(difflib.ndiff(first.splitlines(),
                                                second.splitlines()))))
         raise self.failureException(msg)
Example #4
0
def assert_dumps(root, schema):
    first = dumps(root)
    second = dedent(schema).strip() + '\n'
    if first != second:
        msg = ('Dumped schema mismatches:\n\n{}'
               .format('\n'.join(difflib.ndiff(first.splitlines(),
                                               second.splitlines()))))
        raise AssertionError(msg)