]>
git.proxmox.com Git - ceph.git/blob - ceph/src/boost/libs/python/test/tuple.py
1 # Copyright David Abrahams 2004. Distributed under the Boost
2 # Software License, Version 1.0. (See accompanying
3 # file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
5 >>> from tuple_ext import *
6 >>> def printer(*args):
7 ... for x in args: print(x,)
10 >>> print(convert_to_tuple("this is a test string"))
11 ('t', 'h', 'i', 's', ' ', 'i', 's', ' ', 'a', ' ', 't', 'e', 's', 't', ' ', 's', 't', 'r', 'i', 'n', 'g')
12 >>> t1 = convert_to_tuple("this is")
14 >>> test_operators(t1,t2,printer) #doctest: +NORMALIZE_WHITESPACE
15 ('t', 'h', 'i', 's', ' ', 'i', 's', 1, 2, 3, 4)
20 >>> make_tuple('hello', 42)
24 from __future__
import print_function
32 return doctest
.testmod(sys
.modules
.get(__name__
))
34 if __name__
== '__main__':
38 if (status
== 0): print("Done.")