Skip to content

Commit

Permalink
FIx save_project issues in UT
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys committed Apr 29, 2024
1 parent 48a74f9 commit ef93eb0
Showing 1 changed file with 9 additions and 16 deletions.
25 changes: 9 additions & 16 deletions _unittest/test_21_Circuit.py
Original file line number Diff line number Diff line change
Expand Up @@ -504,14 +504,11 @@ def test_38_browse_log_file(self):
self.aedtapp.analyze()
time.sleep(2)
assert self.aedtapp.browse_log_file()
if is_linux and config["desktopVersion"] == "2024.1":
time.sleep(1)
self.aedtapp.odesktop.CloseAllWindows()
self.circuitprj.odesktop.CloseAllWindows()
self.aedtapp.save_project()
assert self.aedtapp.browse_log_file()
assert not self.aedtapp.browse_log_file(os.path.join(self.aedtapp.working_directory, "logfiles"))
assert self.aedtapp.browse_log_file(self.aedtapp.working_directory)
if not is_linux:
self.aedtapp.save_project()
assert self.aedtapp.browse_log_file()
assert not self.aedtapp.browse_log_file(os.path.join(self.aedtapp.working_directory, "logfiles"))
assert self.aedtapp.browse_log_file(self.aedtapp.working_directory)

def test_39_export_results_circuit(self):
exported_files = self.aedtapp.export_results()
Expand Down Expand Up @@ -714,14 +711,10 @@ def test_41_assign_excitations(self, add_app):
assert "PortTest" in c.excitations
c.excitation_objects["PortTest"].delete()
assert len(c.excitation_objects) == 0
if is_linux and config["desktopVersion"] == "2024.1":
time.sleep(1)
self.aedtapp.odesktop.CloseAllWindows()
self.circuitprj.odesktop.CloseAllWindows()
time.sleep(1)
self.aedtapp.save_project()
c = add_app(application=Circuit, design_name="sources")
assert c.sources
if not is_linux:
self.aedtapp.save_project()
c = add_app(application=Circuit, design_name="sources")
assert c.sources

def test_41_set_variable(self):
self.aedtapp.variable_manager.set_variable("var_test", expression="123")
Expand Down

0 comments on commit ef93eb0

Please sign in to comment.