def _test_output_scalars(S): output_scalars = S.user_op._output_scalars or summary.DEFAULT_OUTPUT_SCALARS input_path = S.args.test_output_scalars logger = TestOutputLogger() if input_path == "-" and sys.stdin.isatty(): cli.note("Type patterns and press Enter to test. " "Use Ctrl-c or empty line to exit.") with _open_output(input_path) as f: summary.test_output(f, output_scalars, logger)
def _test_output_scalars(opdef, args): f = _open_output(args.test_output_scalars) cb = TestOutputLogger() with f: summary.test_output(f, _testable_output_scalars(opdef), cb)