Lines Matching +full:open +full:- +full:source
20 # tr a-z A-Z is not portable, so make the ranges explicit
33 with t.open(TESTFN, 'w') as f:
35 with open(TESTFN) as f:
41 with open(TESTFN, 'w') as f:
46 with open(TESTFN2) as f:
52 with open(TESTFN, 'w') as f:
56 f = t.open(TESTFN, 'r')
65 with open(TESTFN, 'w') as f:
67 with open(TESTFN2, 'w') as f:
71 with open(TESTFN2) as f:
77 with open(TESTFN, 'w') as f:
80 f = t.open(TESTFN, 'r')
90 with t.open(TESTFN, 'w') as f:
92 with open(TESTFN) as f:
98 t.append('tr a-z A-Z', pipes.STDIN_STDOUT)
100 "<Template instance, steps=[('tr a-z A-Z', '--')]>")
110 # check calling open('r') on a pipe ending with
114 self.assertRaises(ValueError, t.open, 'bogusfile', 'r')
117 # check calling open('w') on a pipe ending with
118 # a source raises ValueError
120 t.prepend('boguscmd', pipes.SOURCE)
121 self.assertRaises(ValueError, t.open, 'bogusfile', 'w')
126 # try a non-string command
132 # shouldn't be able to append a source
133 self.assertRaises(ValueError, t.append, 'boguscmd', pipes.SOURCE)
160 # try a non-string command
164 self.assertRaises(ValueError, t.prepend, 'tr a-z A-Z', 'xx')
171 t.prepend('boguscmd', pipes.SOURCE)
172 self.assertRaises(ValueError, t.prepend, 'boguscmd', pipes.SOURCE)
192 self.assertRaises(ValueError, t.open, 'bogusfile', 'x')
196 t.append('tr a-z A-Z', pipes.STDIN_STDOUT)