'Test handling of flag lists'

@mock.patch.object(splice, '_c_splice')
def test_flags_list(self, mock_splice):

    splice(1, None, 2, None, 3, [splice.SPLICE_F_MOVE, splice.SPLICE_F_NONBLOCK])
    flags = (splice.SPLICE_F_MOVE | splice.SPLICE_F_NONBLOCK)
    self.assertEqual(mock_splice.call_args, ((1, None, 2, None, 3, flags), {}))
    mock_splice.reset_mock()
    splice(1, None, 2, None, 3, [])
    self.assertEqual(mock_splice.call_args, ((1, None, 2, None, 3, 0), {}))
