@@ -72,6 +72,13 @@ def hfss_app(add_app):
7272 app .close_project (app .project_name )
7373
7474
75+ @pytest .fixture
76+ def maxwell_circuit_app (add_app ):
77+ app = add_app (application = pyaedt .MaxwellCircuit )
78+ yield app
79+ app .close_project (app .project_name )
80+
81+
7582class TestClass :
7683 def test_set_project_variables (self , hfss_app ):
7784 hfss_app ["$Test_Global1" ] = "5rad"
@@ -267,6 +274,9 @@ def test_delete_variable(self, app):
267274 assert app .variable_manager .delete_variable ("Var1" )
268275
269276 def test_postprocessing (self , app ):
277+ if app .design_type == "Twin Builder" :
278+ pytest .skip ("Twin Builder is crashing for this test." )
279+
270280 v1 = app .variable_manager .set_variable ("test_post1" , 10 , is_post_processing = True , circuit_parameter = False )
271281 assert v1
272282 assert not app .variable_manager .set_variable ("test2" , "v1+1" )
@@ -292,17 +302,17 @@ def test_arrays(self, app):
292302 assert app .variable_manager ["getvalue1" ].numeric_value == 1.0
293303 assert app .variable_manager ["getvalue2" ].numeric_value == 1.0
294304
295- def test_maxwell_circuit_variables (self , app ):
296- app ["var2" ] = "10mm"
297- assert app ["var2" ] == "10mm"
298- v_circuit = app .variable_manager
305+ def test_maxwell_circuit_variables (self , maxwell_circuit_app ):
306+ maxwell_circuit_app ["var2" ] = "10mm"
307+ assert maxwell_circuit_app ["var2" ] == "10mm"
308+ v_circuit = maxwell_circuit_app .variable_manager
299309 var_circuit = v_circuit .variable_names
300310 assert "var2" in var_circuit
301311 assert v_circuit .independent_variables ["var2" ].units == "mm"
302- app ["var3" ] = "10deg"
303- app ["var4" ] = "10rad"
304- assert app ["var3" ] == "10deg"
305- assert app ["var4" ] == "10rad"
312+ maxwell_circuit_app ["var3" ] = "10deg"
313+ maxwell_circuit_app ["var4" ] = "10rad"
314+ assert maxwell_circuit_app ["var3" ] == "10deg"
315+ assert maxwell_circuit_app ["var4" ] == "10rad"
306316
307317 def test_project_variable_operation (self , app ):
308318 app ["$my_proj_test" ] = "1mm"
0 commit comments