def __init__(self, options): Wrapper.__init__(self, options) if options.formatter: Writer.set(options.formatter(options)) else: Writer.set(SqlInsertWriter(options))
def __init__(self, options): Wrapper.__init__(self, options) if options.formatter: Writer.set(options.formatter(options)) else: Writer.set(StatementActivityWriter(options))
def __init__(self, options): Wrapper.__init__(self, options) if options.formatter: Writer.set(options.formatter(options)) else: Writer.set(ExecuteWriter())
def __init__(self, options): Wrapper.__init__(self, options) if options.formatter: Writer.set(options.formatter()) else: Writer.set(SimplifiedWriter())
def __init__(self, left, right): Wrapper.__init__(self, left) self.left = left self.right = right if left.formatter: Writer.set(left.formatter(left, right)) else: Writer.set(DiffWriter(left, right))
def write(self): try: sys.stdout.write(Writer.write(self.run())) except BaseException as e: log.logger.exception(e) return -1 return 0
def test(): environ['DBNAV_INPUT'] = path.join(dir, 'resources', tc) p, e = params(dir, tc), expected(dir, tc) items = f.run([ '--debug', '-L', LOGFILE] + parameters + p) actual = Writer.write(items) write_actual(command, tc, actual) # WARNING: this is code that creates the expected output - only # uncomment when in need! # e = update_expected(dir, tc, actual) assert_equal(e, actual)
def write(self, items): sys.stdout.write(Writer.write(items)) sys.stdout.write('\n')