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_no_argv(self): self.assertEqual('foo', find_stream('foo', []))