Skip to content

Commit

Permalink
Add differential pairs (#900)
Browse files Browse the repository at this point in the history
* Added set_differential_pair to hfss

* black checking

* added set_differential_pairs in 3dLayout
added load_diff_pairs_from_file in 3dlayout

* added save_diff_pairs_to_file in 3dLayout

* Added Circuit differential pairs
Added HFSS unit tests

* Added 3dlayout unit tests

* fixed bug and completed unit tests

* fixed unit test for ironpython

* optimized close_design.
fixed and improved unit test tear down

* optimized and fixed conftest.py
unit test now consistently use the BasisTest class

* black checking

* style check on test_40_3dlayout_edb.py

* restored run_unittests.py filter

* fixing in multiparts.py for ironpython

* style check

* Test Massimo

* replaced corrupted Cassegrain.aedt unit test project

* replaced corrupted Cassegrain.aedt unit test project

* fixes in unit test

* fixes in unit test

* fixes in unit test

* code clean up

* black check

* fix to UT

* fix to UT

* fixed line ending management in git repo

* fix in hfss3dlayout.py

* trying to fix SBR unit test

* updated examples version

* fix to UT

* fix to UT

* fix to UT

* fix to UT

* testing fix to UT

* testing fix to UT

* fix to UT

* fix to UT

* fix to UT

* fix to UT

* testing fix to UT

* trigger CI

Co-authored-by: maxcapodi78 <Shark78>
  • Loading branch information
Alberto-DM authored Mar 1, 2022
1 parent 15f928c commit f3ef590
Show file tree
Hide file tree
Showing 60 changed files with 22,031 additions and 23,186 deletions.
22 changes: 19 additions & 3 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@
#
# image files are treated as binary by default.
###############################################################################
#*.jpg binary
#*.png binary
#*.gif binary
*.jpg binary
*.png binary
*.gif binary

###############################################################################
# diff behavior for common document formats
Expand All @@ -61,3 +61,19 @@
#*.PDF diff=astextplain
#*.rtf diff=astextplain
#*.RTF diff=astextplain

###############################################################################
# behavior for Ansys files
#
# Ansys files are treated as binary by default.
###############################################################################
*.aedt binary
*.aedtz binary
edb.def binary
*.a3dcomp binary
*.emn binary
*.emp binary
*.acf text eol=lf
*.dat text eol=lf
*.stp binary
*.step binary
21 changes: 12 additions & 9 deletions _unittest/conftest.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@

# Import required modules
from pyaedt import Hfss
from pyaedt.application.Design import DesignCache
from pyaedt.generic.filesystem import Scratch

test_project_name = "test_primitives"
Expand Down Expand Up @@ -79,8 +78,8 @@
}


class BasisTest:
def setup_class(self, project_name=None, design_name=None, solution_type=None, application=None):
class BasisTest(object):
def my_setup(self, project_name=None, design_name=None, solution_type=None, application=None):

with Scratch(scratch_path) as self.local_scratch:
if project_name:
Expand All @@ -101,24 +100,28 @@ def setup_class(self, project_name=None, design_name=None, solution_type=None, a
specified_version=desktop_version,
)
self.project_name = self.aedtapp.project_name
self.cache = DesignCache(self.aedtapp)

def teardown_class(self):
def my_teardown(self):
self.aedtapp._desktop.ClearMessages("", "", 3)
if self.project_name in self.aedtapp.project_list:
self.aedtapp.close_project(name=self.project_name, saveproject=False)
self.local_scratch.remove()
gc.collect()
list_of_projects = list(self.aedtapp._desktop.GetProjectList())
for project in list_of_projects:
try:
self.aedtapp._desktop.CloseProject(project)
except: # pragma: no cover
pass
del self.aedtapp

def teardown(self):
"""
Could be redefined
"""
pass

def setup(self):
"""
Could be redefined
"""
pass


# Define desktopVersion explicitly since this is imported by other modules
Expand Down
Binary file modified _unittest/example_models/AMI_Example.aedb/edb.def
Binary file not shown.
2 changes: 0 additions & 2 deletions _unittest/example_models/AMI_Example.aedb/stride/model.index

This file was deleted.

Loading

0 comments on commit f3ef590

Please sign in to comment.