Lines Matching refs:pipes
1 import pipes
21 t = pipes.Template()
22 t.append(s_command, pipes.STDIN_STDOUT)
32 t = pipes.Template()
33 t.append(s_command + ' < $IN > $OUT', pipes.FILEIN_FILEOUT)
41 t = pipes.Template()
42 t.append(s_command + ' < $IN', pipes.FILEIN_STDOUT)
53 t=pipes.Template()
63 t=pipes.Template()
70 t = pipes.Template()
80 self.assertEqual(pipes.quote(''), "''")
81 self.assertEqual(pipes.quote(safeunquoted), safeunquoted)
82 self.assertEqual(pipes.quote('test file name'), "'test file name'")
84 self.assertEqual(pipes.quote('test%sname' % u),
87 self.assertEqual(pipes.quote("test%s'name'" % u),
91 t = pipes.Template()
93 t.append('tr a-z A-Z', pipes.STDIN_STDOUT)
98 t = pipes.Template()
107 t = pipes.Template()
108 t.append('boguscmd', pipes.SINK)
114 t = pipes.Template()
115 t.prepend('boguscmd', pipes.SOURCE)
119 t = pipes.Template()
122 self.assertRaises(TypeError, t.append, 7, pipes.STDIN_STDOUT)
128 self.assertRaises(ValueError, t.append, 'boguscmd', pipes.SOURCE)
131 t = pipes.Template()
132 t.append('boguscmd', pipes.SINK)
133 self.assertRaises(ValueError, t.append, 'boguscmd', pipes.SINK)
136 t = pipes.Template()
138 pipes.FILEIN_FILEOUT)
139 t = pipes.Template()
141 pipes.FILEIN_STDOUT)
144 t = pipes.Template()
146 pipes.FILEIN_FILEOUT)
147 t = pipes.Template()
149 pipes.STDIN_FILEOUT)
153 t = pipes.Template()
156 self.assertRaises(TypeError, t.prepend, 7, pipes.STDIN_STDOUT)
162 self.assertRaises(ValueError, t.prepend, 'boguscmd', pipes.SINK)
165 t = pipes.Template()
166 t.prepend('boguscmd', pipes.SOURCE)
167 self.assertRaises(ValueError, t.prepend, 'boguscmd', pipes.SOURCE)
170 t = pipes.Template()
172 pipes.FILEIN_FILEOUT)
173 t = pipes.Template()
175 pipes.FILEIN_STDOUT)
178 t = pipes.Template()
180 pipes.FILEIN_FILEOUT)
181 t = pipes.Template()
183 pipes.STDIN_FILEOUT)
186 t = pipes.Template()
190 t = pipes.Template()
191 t.append('tr a-z A-Z', pipes.STDIN_STDOUT)