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