Exemple #1
0
 def test_opens_file(self):
     f = NamedTemporaryFile()
     f.write(b'foo')
     f.flush()
     stream = find_stream('bar', [f.name])
     self.assertEqual(b'foo', stream.read())
 def test_opens_file(self):
     f = NamedTemporaryFile()
     f.write(b'foo')
     f.flush()
     stream = find_stream('bar', [f.name])
     self.assertEqual(b'foo', stream.read())
Exemple #3
0
 def test_no_argv(self):
     self.assertEqual('foo', find_stream('foo', []))
 def test_no_argv(self):
     self.assertEqual('foo', find_stream('foo', []))