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)
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)
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)
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)