Move to kernel style SPDX license identifiers
[babeltrace.git] / tests / bindings / python / bt2 / test_package.py
1 # SPDX-License-Identifier: GPL-2.0-only
2 #
3 # Copyright (C) 2019 EfficiOS Inc.
4 #
5
6 import bt2
7 import unittest
8
9
10 class PackageTestCase(unittest.TestCase):
11 def _assert_in_bt2(self, name):
12 self.assertIn(name, dir(bt2))
13
14
15 _public_names = [
16 '__version__',
17 '_ArrayField',
18 '_ArrayFieldClass',
19 '_ArrayFieldClassConst',
20 '_ArrayFieldConst',
21 '_ArrayValueConst',
22 '_BitArrayField',
23 '_BitArrayFieldClass',
24 '_BitArrayFieldClassConst',
25 '_BitArrayFieldConst',
26 '_BoolField',
27 '_BoolFieldClass',
28 '_BoolFieldClassConst',
29 '_BoolFieldConst',
30 '_BoolValueConst',
31 '_ClockSnapshotConst',
32 '_ComponentClassErrorCause',
33 '_ComponentErrorCause',
34 '_CurrentArrayElementFieldPathItem',
35 '_CurrentOptionContentFieldPathItem',
36 '_DiscardedEventsMessage',
37 '_DiscardedEventsMessageConst',
38 '_DiscardedPacketsMessage',
39 '_DiscardedPacketsMessageConst',
40 '_DoublePrecisionRealField',
41 '_DoublePrecisionRealFieldConst',
42 '_DynamicArrayField',
43 '_DynamicArrayFieldClass',
44 '_DynamicArrayFieldClassConst',
45 '_DynamicArrayFieldConst',
46 '_DynamicArrayWithLengthFieldFieldClass',
47 '_DynamicArrayWithLengthFieldFieldClassConst',
48 '_EnumerationField',
49 '_EnumerationFieldClass',
50 '_EnumerationFieldClassConst',
51 '_EnumerationFieldConst',
52 '_Error',
53 '_ErrorCause',
54 '_EventMessage',
55 '_EventMessageConst',
56 '_FilterComponentClassConst',
57 '_FilterComponentConst',
58 '_IndexFieldPathItem',
59 '_IntegerField',
60 '_IntegerFieldClass',
61 '_IntegerFieldClassConst',
62 '_IntegerFieldConst',
63 '_IntegerValue',
64 '_IntegerValueConst',
65 '_MapValueConst',
66 '_MessageIteratorErrorCause',
67 '_MessageIteratorInactivityMessage',
68 '_MessageIteratorInactivityMessageConst',
69 '_OptionFieldClass',
70 '_OptionFieldClassConst',
71 '_OptionWithBoolSelectorFieldClass',
72 '_OptionWithBoolSelectorFieldClassConst',
73 '_OptionWithIntegerSelectorFieldClass',
74 '_OptionWithIntegerSelectorFieldClassConst',
75 '_OptionWithSelectorFieldClass',
76 '_OptionWithSelectorFieldClassConst',
77 '_OptionWithSignedIntegerSelectorFieldClass',
78 '_OptionWithSignedIntegerSelectorFieldClassConst',
79 '_OptionWithUnsignedIntegerSelectorFieldClass',
80 '_OptionWithUnsignedIntegerSelectorFieldClassConst',
81 '_PacketBeginningMessage',
82 '_PacketBeginningMessageConst',
83 '_PacketEndMessage',
84 '_PacketEndMessageConst',
85 '_RealField',
86 '_RealFieldClass',
87 '_RealFieldClassConst',
88 '_RealFieldConst',
89 '_RealValueConst',
90 '_SignedEnumerationField',
91 '_SignedEnumerationFieldClass',
92 '_SignedEnumerationFieldClassConst',
93 '_SignedEnumerationFieldConst',
94 '_SignedIntegerField',
95 '_SignedIntegerFieldClass',
96 '_SignedIntegerFieldClassConst',
97 '_SignedIntegerFieldConst',
98 '_SignedIntegerRangeConst',
99 '_SignedIntegerRangeSetConst',
100 '_SignedIntegerValueConst',
101 '_SinglePrecisionRealField',
102 '_SinglePrecisionRealFieldConst',
103 '_SinkComponentClassConst',
104 '_SinkComponentConst',
105 '_SourceComponentClassConst',
106 '_SourceComponentConst',
107 '_StaticArrayField',
108 '_StaticArrayFieldClass',
109 '_StaticArrayFieldClassConst',
110 '_StaticArrayFieldConst',
111 '_StreamBeginningMessage',
112 '_StreamBeginningMessageConst',
113 '_StreamEndMessage',
114 '_StreamEndMessageConst',
115 '_StringField',
116 '_StringFieldClass',
117 '_StringFieldClassConst',
118 '_StringFieldConst',
119 '_StringValueConst',
120 '_StructureField',
121 '_StructureFieldClass',
122 '_StructureFieldClassConst',
123 '_StructureFieldConst',
124 '_UnknownClockSnapshot',
125 '_UnsignedEnumerationField',
126 '_UnsignedEnumerationFieldClass',
127 '_UnsignedEnumerationFieldClassConst',
128 '_UnsignedEnumerationFieldConst',
129 '_UnsignedIntegerField',
130 '_UnsignedIntegerFieldClass',
131 '_UnsignedIntegerFieldClassConst',
132 '_UnsignedIntegerFieldConst',
133 '_UnsignedIntegerRangeConst',
134 '_UnsignedIntegerRangeSetConst',
135 '_UnsignedIntegerValueConst',
136 '_UserFilterComponent',
137 '_UserMessageIterator',
138 '_UserSinkComponent',
139 '_UserSourceComponent',
140 '_VariantField',
141 '_VariantField',
142 '_VariantFieldClass',
143 '_VariantFieldClassConst',
144 '_VariantFieldClassWithIntegerSelector',
145 '_VariantFieldClassWithIntegerSelectorConst',
146 '_VariantFieldClassWithoutSelector',
147 '_VariantFieldClassWithoutSelectorConst',
148 '_VariantFieldClassWithSignedIntegerSelector',
149 '_VariantFieldClassWithSignedIntegerSelectorConst',
150 '_VariantFieldClassWithUnsignedIntegerSelector',
151 '_VariantFieldClassWithUnsignedIntegerSelectorConst',
152 '_VariantFieldConst',
153 '_VariantFieldConst',
154 'ArrayValue',
155 'AutoSourceComponentSpec',
156 'BoolValue',
157 'ClockClassOffset',
158 'ComponentClassType',
159 'ComponentDescriptor',
160 'ComponentSpec',
161 'create_value',
162 'EventClassLogLevel',
163 'FieldPathScope',
164 'find_plugin',
165 'find_plugins',
166 'find_plugins_in_path',
167 'get_global_logging_level',
168 'get_minimal_logging_level',
169 'Graph',
170 'IntegerDisplayBase',
171 'Interrupter',
172 'LoggingLevel',
173 'MapValue',
174 'plugin_component_class',
175 'QueryExecutor',
176 'RealValue',
177 'register_plugin',
178 'set_global_logging_level',
179 'SignedIntegerRange',
180 'SignedIntegerRangeSet',
181 'SignedIntegerValue',
182 'StringValue',
183 'TraceCollectionMessageIterator',
184 'UnsignedIntegerRange',
185 'UnsignedIntegerRangeSet',
186 'UnsignedIntegerValue',
187 ]
188
189 for name in _public_names:
190
191 def test_func(self):
192 self._assert_in_bt2(name)
193
194 setattr(PackageTestCase, 'test_has_' + name, test_func)
195
196
197 if __name__ == '__main__':
198 unittest.main()
This page took 0.052822 seconds and 4 git commands to generate.