'Test handling of file-descriptors'

@mock.patch.object(tee, '_c_tee')
def test_fileno(self, mock_tee):

    with pipe() as (pa, pb):
        tee(pa, pb, 3, 0)
        self.assertEqual(mock_tee.call_args, ((pa, pb, 3, 0), {}))
        mock_tee.reset_mock()
        tee(os.fdopen(pa, 'r'), os.fdopen(pb, 'w'), 3, 0)
        self.assertEqual(mock_tee.call_args, ((pa, pb, 3, 0), {}))
