08a320d29e445302966df0cdeea0f2a579608829
[platform/upstream/gpgme.git] / lang / python / tests / t-wrapper.py
1 #!/usr/bin/env python
2
3 # Copyright (C) 2016 g10 Code GmbH
4 #
5 # This file is part of GPGME.
6 #
7 # GPGME is free software; you can redistribute it and/or modify it
8 # under the terms of the GNU General Public License as published by
9 # the Free Software Foundation; either version 2 of the License, or
10 # (at your option) any later version.
11 #
12 # GPGME is distributed in the hope that it will be useful, but WITHOUT
13 # ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 # or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU Lesser General
15 # Public License for more details.
16 #
17 # You should have received a copy of the GNU Lesser General Public
18 # License along with this program; if not, see <http://www.gnu.org/licenses/>.
19
20 import gpg
21 import support
22 _ = support # to appease pyflakes.
23
24 d0 = gpg.Data()
25 d0.seek # trigger on-demand-wrapping
26 assert d0.seek == d0.seek, "Generated wrapper functions are not cached"
27 assert hasattr(gpg.Data, 'seek'), "Generated wrapper functions are not shared"