Lines Matching refs:file
10 # sep, end, and file.
16 lambda args, sep, end, file: print(*args),
18 lambda args, sep, end, file: print(file=file, *args),
20 lambda args, sep, end, file: print(end=end, *args),
22 lambda args, sep, end, file: print(end=end, file=file, *args),
24 lambda args, sep, end, file: print(sep=sep, *args),
26 lambda args, sep, end, file: print(sep=sep, file=file, *args),
28 lambda args, sep, end, file: print(sep=sep, end=end, *args),
30 lambda args, sep, end, file: print(sep=sep, end=end, file=file, *args),
47 sep=NotDefined, end=NotDefined, file=NotDefined):
49 # and with sep, end, and file, if they're defined. Result
53 # and file are defined.
56 file is not NotDefined)]
59 fn(args, sep, end, file)
65 # Run the test 2 ways: not using file, and using
66 # file directed to a StringIO.
70 # When writing to a file, stdout is expected to be empty
72 self.check('', args, sep=sep, end=end, file=o)
101 self.assertRaises(AttributeError, print, '', file='')
117 print(1, file=f, end='', flush=True)
118 print(2, file=f, end='', flush=True)
119 print(3, file=f, flush=False)
130 self.assertRaises(RuntimeError, print, 1, file=noflush(), flush=True)
196 'file=<output_stream>)"?', str(context.exception))
203 'file=<output_stream>)"?', str(context.exception))