File tree Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Expand file tree Collapse file tree 1 file changed +20
-0
lines changed Original file line number Diff line number Diff line change @@ -202,6 +202,26 @@ def test_app_getters_notstale(embedded_app):
202
202
assert model .Name != "b"
203
203
204
204
205
+ @pytest .mark .embedding
206
+ def test_building_gallery (embedded_app ):
207
+ """Test for checking building gallery .
208
+
209
+ When building gallery each example files create
210
+ an instance of app. When BUILDING GALLERY flag is enabled,
211
+ only one instance is kept.
212
+ """
213
+ import ansys .mechanical .core as mech
214
+
215
+ _version = embedded_app .version
216
+ embedded_app .update_globals (globals ())
217
+ embedded_app .new ()
218
+ with pytest .raises (Exception ):
219
+ embedded_app2 = mech .App (version = _version )
220
+ mech .BUILDING_GALLERY = True
221
+ embedded_app3 = mech .App (version = _version )
222
+ embedded_app3 .update_globals (globals ())
223
+
224
+
205
225
@pytest .mark .embedding_scripts
206
226
@pytest .mark .python_env
207
227
def test_warning_message (test_env , pytestconfig , run_subprocess , rootdir ):
You can’t perform that action at this time.
0 commit comments