コード例 #1
0
 def test_get_stream_file_raises_devnull(self):
     with self.assertRaises(ValueError):
         shell._get_stream_file(shell.DEVNULL)
コード例 #2
0
    def test_get_stream_file(self):
        self.assertEqual(shell._get_stream_file(shell.PIPE), sys.stdout)
        self.assertEqual(shell._get_stream_file(shell.STDOUT), sys.stdout)

        self.assertEqual(shell._get_stream_file(sys.stdout), sys.stdout)
        self.assertEqual(shell._get_stream_file(sys.stderr), sys.stderr)