Home | History | Annotate | Download | only in test

Lines Matching refs:sep

16 #  sep, end, and file
22 lambda args, sep, end, file: print(*args),
24 lambda args, sep, end, file: print(file=file, *args),
26 lambda args, sep, end, file: print(end=end, *args),
28 lambda args, sep, end, file: print(end=end, file=file, *args),
30 lambda args, sep, end, file: print(sep=sep, *args),
32 lambda args, sep, end, file: print(sep=sep, file=file, *args),
34 lambda args, sep, end, file: print(sep=sep, end=end, *args),
36 lambda args, sep, end, file: print(sep=sep, end=end, file=file, *args),
48 sep=NotDefined, end=NotDefined, file=NotDefined):
50 # and with sep, end, and file, if they're defined. Result
53 # Look up the actual function to call, based on if sep, end, and file
55 fn = dispatch[(sep is not NotDefined,
60 fn(args, sep, end, file)
65 def x(expected, args, sep=NotDefined, end=NotDefined):
69 self.check(expected, args, sep=sep, end=end)
73 self.check('', args, sep=sep, end=end, file=o)
83 x('1*2\n', (1, 2), sep='*')
85 x('a\nb\n', ('a', 'b'), sep='\n')
86 x('1.01', (1.0, 1), sep='', end='')
87 x('1*a*1.3+', (1, 'a', 1.3), sep='*', end='+')
88 x('a\n\nb\n', ('a\n', 'b'), sep='\n')
89 x('\0+ +\0\n', ('\0', ' ', '\0'), sep='+')
92 x('a\n b\n', ('a\n', 'b'), sep=None)
94 x('a\n b\n', ('a\n', 'b'), sep=None, end=None)
105 self.assertRaises(TypeError, print, '', sep=3)
110 # If an unicode arg is passed, sep and end should be unicode, too.
133 print(sep=u'x', file=buf)