blob: b0f47079fdf069b017541dfa287f4bf5ed323d2b [file] [log] [blame]
Wenzel Jakob38bd7112015-07-05 20:05:44 +02001#!/usr/bin/env python3
2import sys, pydoc
3sys.path.append('.')
4
5from example import Example2
6
7Example2.value = 15
8print(Example2.value)
9print(Example2.value2)
10
11try:
12 Example2()
13except Exception as e:
14 print(e)
15
16try:
17 Example2.value2 = 15
18except Exception as e:
19 print(e)
20
21instance = Example2.new_instance()
22
23dict_result = instance.get_dict()
24dict_result['key2'] = 'value2'
25instance.print_dict(dict_result)
26
27dict_result = instance.get_dict_2()
28dict_result['key2'] = 'value2'
29instance.print_dict_2(dict_result)
30
31list_result = instance.get_list()
32list_result.append('value2')
33instance.print_list(list_result)
34
35list_result = instance.get_list_2()
36list_result.append('value2')
37instance.print_list_2(list_result)
38
39try:
40 instance.throw_exception()
41except Exception as e:
42 print(e)
43
44print(instance.pair_passthrough((True, "test")))
45print(instance.tuple_passthrough((True, "test", 5)))
46
47print(pydoc.render_doc(Example2, "Help on %s"))