Blame lang/python/tests/t-wrapper.py
|
Packit Service |
672cf4 |
#!/usr/bin/env python
|
|
Packit Service |
672cf4 |
|
|
Packit Service |
672cf4 |
# Copyright (C) 2016 g10 Code GmbH
|
|
Packit Service |
672cf4 |
#
|
|
Packit Service |
672cf4 |
# This file is part of GPGME.
|
|
Packit Service |
672cf4 |
#
|
|
Packit Service |
672cf4 |
# GPGME is free software; you can redistribute it and/or modify it
|
|
Packit Service |
672cf4 |
# under the terms of the GNU General Public License as published by
|
|
Packit Service |
672cf4 |
# the Free Software Foundation; either version 2 of the License, or
|
|
Packit Service |
672cf4 |
# (at your option) any later version.
|
|
Packit Service |
672cf4 |
#
|
|
Packit Service |
672cf4 |
# GPGME is distributed in the hope that it will be useful, but WITHOUT
|
|
Packit Service |
672cf4 |
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
|
Packit Service |
672cf4 |
# or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General
|
|
Packit Service |
672cf4 |
# Public License for more details.
|
|
Packit Service |
672cf4 |
#
|
|
Packit Service |
672cf4 |
# You should have received a copy of the GNU Lesser General Public
|
|
Packit Service |
6c01f9 |
# License along with this program; if not, see <http://www.gnu.org/licenses/>.
|
|
Packit Service |
672cf4 |
|
|
Packit Service |
672cf4 |
import gpg
|
|
Packit Service |
672cf4 |
import support
|
|
Packit Service |
6c01f9 |
_ = support # to appease pyflakes.
|
|
Packit Service |
672cf4 |
|
|
Packit Service |
672cf4 |
d0 = gpg.Data()
|
|
Packit Service |
6c01f9 |
d0.seek # trigger on-demand-wrapping
|
|
Packit Service |
672cf4 |
assert d0.seek == d0.seek, "Generated wrapper functions are not cached"
|
|
Packit Service |
672cf4 |
assert hasattr(gpg.Data, 'seek'), "Generated wrapper functions are not shared"
|