-
Notifications
You must be signed in to change notification settings - Fork 10
/
test_imports.py
321 lines (219 loc) · 11.7 KB
/
test_imports.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
# SPDX-License-Identifier: Apache-2.0
# Copyright 2022 The Foundry Visionmongers Ltd
"""
Test MediaCreation traits and specifications can be imported
"""
# pylint: disable=no-self-use
# pylint: disable=invalid-name
# pylint: disable=unused-import,import-outside-toplevel
# pylint: disable=missing-class-docstring,missing-function-docstring
import pytest
@pytest.fixture(autouse=True)
def always_unload_openassetio_mediacreation_modules(
unload_openassetio_mediacreation_modules, # pylint: disable=unused-argument
):
"""
Removes openassetio modules from the sys.modules cache that
otherwise mask cyclic dependencies.
"""
class Test_package_imports:
def test_importing_openassetio_mediacreation_succeeds(self):
import openassetio_mediacreation
def test_importing_traits_succeeds(self):
from openassetio_mediacreation import traits
def test_importing_specifications_succeeds(self):
from openassetio_mediacreation import specifications
class Test_trait_imports_content:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import content
def test_importing_LocatableContentTrait_succeeds(self):
from openassetio_mediacreation.traits.content import LocatableContentTrait
class Test_trait_imports_managementPolicy:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import managementPolicy
def test_importing_ManagedTrait_succeeds(self):
from openassetio_mediacreation.traits.managementPolicy import ManagedTrait
class Test_trait_imports_identity:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import identity
def test_importing_DisplayNameTrait_succeeds(self):
from openassetio_mediacreation.traits.identity import DisplayNameTrait
class Test_trait_imports_auth:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import auth
def test_importing_BearerToken_succeeds(self):
from openassetio_mediacreation.traits.auth import BearerTokenTrait
class Test_trait_imports_application:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import application
def test_importing_Config_succeeds(self):
from openassetio_mediacreation.traits.application import ConfigTrait
def test_importing_Manifest_succeeds(self):
from openassetio_mediacreation.traits.application import ManifestTrait
def test_importing_Work_succeeds(self):
from openassetio_mediacreation.traits.application import WorkTrait
class Test_trait_imports_usage:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import usage
def test_importing_Entity_succeeds(self):
from openassetio_mediacreation.traits.usage import EntityTrait
def test_importing_Relationship_succeeds(self):
from openassetio_mediacreation.traits.usage import RelationshipTrait
class Test_trait_imports_lifecycle:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import lifecycle
def test_importing_Version_succeeds(self):
from openassetio_mediacreation.traits.lifecycle import VersionTrait
def test_importing_Stable_succeeds(self):
from openassetio_mediacreation.traits.lifecycle import StableTrait
class Test_trait_imports_relationship:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import relationship
def test_importing_Singular_succeeds(self):
from openassetio_mediacreation.traits.relationship import SingularTrait
def test_importing_Unbounded_succeeds(self):
from openassetio_mediacreation.traits.relationship import UnboundedTrait
class Test_trait_imports_representation:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import representation
def test_importing_Proxy_succeeds(self):
from openassetio_mediacreation.traits.representation import ProxyTrait
def test_importing_Original_succeeds(self):
from openassetio_mediacreation.traits.representation import OriginalTrait
class Test_trait_imports_timeDomain:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import timeDomain
def test_importing_FrameRanged_succeeds(self):
from openassetio_mediacreation.traits.timeDomain import FrameRangedTrait
def test_importing_Static_succeeds(self):
from openassetio_mediacreation.traits.timeDomain import StaticTrait
class Test_trait_imports_twoDimensional:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import twoDimensional
def test_importing_Image_succeeds(self):
from openassetio_mediacreation.traits.twoDimensional import ImageTrait
def test_importing_PixelBased_succeeds(self):
from openassetio_mediacreation.traits.twoDimensional import PixelBasedTrait
def test_importing_Deep_succeeds(self):
from openassetio_mediacreation.traits.twoDimensional import DeepTrait
class Test_trait_imports_threeDimensional:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import threeDimensional
def test_importing_Spatial_succeeds(self):
from openassetio_mediacreation.traits.threeDimensional import SpatialTrait
def test_importing_GeometryTrait_succeeds(self):
from openassetio_mediacreation.traits.threeDimensional import GeometryTrait
def test_importing_Lighting_succeeds(self):
from openassetio_mediacreation.traits.threeDimensional import LightingTrait
def test_importing_Shader_succeeds(self):
from openassetio_mediacreation.traits.threeDimensional import ShaderTrait
def test_importing_IESProfile_succeeds(self):
from openassetio_mediacreation.traits.threeDimensional import IESProfileTrait
def test_importing_SourcePath_succeeds(self):
from openassetio_mediacreation.traits.threeDimensional import SourcePathTrait
def test_importing_SourcePaths_succeeds(self):
from openassetio_mediacreation.traits.threeDimensional import SourcePathsTrait
class Test_trait_imports_metadata:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import metadata
def test_importing_Camera_succeeds(self):
from openassetio_mediacreation.traits.metadata import ArbitraryMetadataTrait
class Test_trait_imports_imaging:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import imaging
def test_importing_Camera_succeeds(self):
from openassetio_mediacreation.traits.imaging import CameraTrait
class Test_trait_imports_color:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import color
def test_importing_Camera_succeeds(self):
from openassetio_mediacreation.traits.color import OCIOColorManagedTrait
class Test_trait_imports_audio:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.traits import audio
def test_importing_Audio_succeeds(self):
from openassetio_mediacreation.traits.audio import AudioTrait
def test_importing_SampleBased_succeeds(self):
from openassetio_mediacreation.traits.audio import SampleBasedTrait
class Test_specification_imports_lifecycle:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.specifications import lifecycle
def test_importing_EntityVersionsRelationship_succeeds(self):
from openassetio_mediacreation.specifications.lifecycle import (
EntityVersionsRelationshipSpecification,
)
def test_importing_StableEntityVersionsRelationship_succeeds(self):
from openassetio_mediacreation.specifications.lifecycle import (
StableEntityVersionsRelationshipSpecification,
)
def test_importing_StableReferenceRelationship_succeeds(self):
from openassetio_mediacreation.specifications.lifecycle import (
StableReferenceRelationshipSpecification,
)
class Test_specification_imports_representation:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.specifications import representation
def test_importing_OriginalRepresentationRelationship_succeeds(self):
from openassetio_mediacreation.specifications.representation import (
OriginalRepresentationRelationshipSpecification,
)
def test_importing_ProxyRepresentationRelationship_succeeds(self):
from openassetio_mediacreation.specifications.representation import (
ProxyRepresentationRelationshipSpecification,
)
class Test_specification_imports_twoDimenstional:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.specifications import twoDimensional
def test_importing_Image_succeeds(self):
from openassetio_mediacreation.specifications.twoDimensional import ImageSpecification
def test_importing_BitmapImageResource_succeeds(self):
from openassetio_mediacreation.specifications.twoDimensional import (
BitmapImageResourceSpecification,
)
def test_importing_DeepBitmapImageResource_succeeds(self):
from openassetio_mediacreation.specifications.twoDimensional import (
DeepBitmapImageResourceSpecification,
)
class Test_specification_imports_threeDimenstional:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.specifications import threeDimensional
def test_importing_Spatial_succeeds(self):
from openassetio_mediacreation.specifications.threeDimensional import SpatialSpecification
def test_importing_SceneResource_succeeds(self):
from openassetio_mediacreation.specifications.threeDimensional import (
SceneResourceSpecification,
)
def test_importing_SceneGeometryResource_succeeds(self):
from openassetio_mediacreation.specifications.threeDimensional import (
SceneGeometryResourceSpecification,
)
def test_importing_SceneCameraResource_succeeds(self):
from openassetio_mediacreation.specifications.threeDimensional import (
SceneCameraResourceSpecification,
)
def test_importing_SceneLightingResource_succeeds(self):
from openassetio_mediacreation.specifications.threeDimensional import (
SceneLightingResourceSpecification,
)
def test_importing_ShaderResource_succeeds(self):
from openassetio_mediacreation.specifications.threeDimensional import (
ShaderResourceSpecification,
)
def test_importing_IESProfileResource_succeeds(self):
from openassetio_mediacreation.specifications.threeDimensional import (
IESProfileResourceSpecification,
)
class Test_specification_imports_audio:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.specifications import audio
def test_importing_Audio_succeeds(self):
from openassetio_mediacreation.specifications.audio import AudioSpecification
def test_importing_SampledAudioResource_succeeds(self):
from openassetio_mediacreation.specifications.audio import (
SampledAudioResourceSpecification,
)
class Test_specification_imports_application:
def test_importing_namespace_succeeds(self):
from openassetio_mediacreation.specifications import application
def test_importing_workfile_succeeds(self):
from openassetio_mediacreation.specifications.application import WorkfileSpecification