Skip to content

Commit

Permalink
Fix UT
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuelopez-ansys committed May 9, 2024
1 parent e31a33a commit 87ee574
Showing 1 changed file with 9 additions and 61 deletions.
70 changes: 9 additions & 61 deletions _unittest/test_12_PostProcessing.py
Original file line number Diff line number Diff line change
Expand Up @@ -477,37 +477,18 @@ def test_58_test_no_report_B(self, q2dtest):
def test_59_test_parse_vector(self):
local_path = os.path.dirname(os.path.realpath(__file__))

out = _parse_aedtplt(
os.path.join(
local_path,
"../../../../../../../AnsysDev/repos/pyaedt/_unittest/example_models",
test_subfolder,
"test_vector.aedtplt",
)
)
out = _parse_aedtplt(os.path.join(local_path, "example_models", test_subfolder, "test_vector.aedtplt"))
assert isinstance(out[0], list)
assert isinstance(out[1], list)
assert isinstance(out[2], list)
assert isinstance(out[3], bool)
assert _parse_aedtplt(
os.path.join(
local_path,
"../../../../../../../AnsysDev/repos/pyaedt/_unittest/example_models",
test_subfolder,
"test_vector_no_solutions.aedtplt",
)
os.path.join(local_path, "example_models", test_subfolder, "test_vector_no_solutions.aedtplt")
)

def test_60_test_parse_vector(self):
local_path = os.path.dirname(os.path.realpath(__file__))
out = _parse_streamline(
os.path.join(
local_path,
"../../../../../../../AnsysDev/repos/pyaedt/_unittest/example_models",
test_subfolder,
"test_streamline.fldplt",
)
)
out = _parse_streamline(os.path.join(local_path, "example_models", test_subfolder, "test_streamline.fldplt"))
assert isinstance(out, list)

def test_61_export_mesh(self, q3dtest):
Expand Down Expand Up @@ -558,25 +539,15 @@ def test_64_eye_meas(self, eye_test):
def test_65_eye_from_json(self, eye_test):
local_path = os.path.dirname(os.path.realpath(__file__))
assert eye_test.post.create_report_from_configuration(
os.path.join(
local_path,
"../../../../../../../AnsysDev/repos/pyaedt/_unittest/example_models",
"report_json",
"EyeDiagram_Report_simple.json",
),
os.path.join(local_path, "example_models", "report_json", "EyeDiagram_Report_simple.json"),
solution_name="QuickEyeAnalysis",
)

def test_66_spectral_from_json(self, circuit_test):
local_path = os.path.dirname(os.path.realpath(__file__))
circuit_test.analyze_setup("Transient")
assert circuit_test.post.create_report_from_configuration(
os.path.join(
local_path,
"../../../../../../../AnsysDev/repos/pyaedt/_unittest/example_models",
"report_json",
"Spectral_Report_Simple.json",
),
os.path.join(local_path, "example_models", "report_json", "Spectral_Report_Simple.json"),
solution_name="Transient",
)

Expand All @@ -586,12 +557,7 @@ def test_66_spectral_from_json(self, circuit_test):
def test_68_eye_from_json(self, eye_test):
local_path = os.path.dirname(os.path.realpath(__file__))
assert eye_test.post.create_report_from_configuration(
os.path.join(
local_path,
"../../../../../../../AnsysDev/repos/pyaedt/_unittest/example_models",
"report_json",
"EyeDiagram_Report.toml",
),
os.path.join(local_path, "example_models", "report_json", "EyeDiagram_Report.toml"),
solution_name="QuickEyeAnalysis",
)

Expand All @@ -602,31 +568,13 @@ def test_69_spectral_from_json(self, circuit_test):
local_path = os.path.dirname(os.path.realpath(__file__))
circuit_test.analyze_setup("Transient")
assert circuit_test.post.create_report_from_configuration(
os.path.join(
local_path,
"../../../../../../../AnsysDev/repos/pyaedt/_unittest/example_models",
"report_json",
"Spectral_Report.json",
),
solution_name="Transient",
os.path.join(local_path, "example_models", "report_json", "Spectral_Report.json"), solution_name="Transient"
)

def test_70_far_field_data(self):
local_path = os.path.dirname(os.path.realpath(__file__))
eep_file1 = os.path.join(
local_path,
"../../../../../../../AnsysDev/repos/pyaedt/_unittest/example_models",
test_subfolder,
"eep",
"eep.txt",
)
eep_file2 = os.path.join(
local_path,
"../../../../../../../AnsysDev/repos/pyaedt/_unittest/example_models",
test_subfolder,
"eep",
"eep.txt",
)
eep_file1 = os.path.join(local_path, "example_models", test_subfolder, "eep", "eep.txt")
eep_file2 = os.path.join(local_path, "example_models", test_subfolder, "eep", "eep.txt")
frequencies = [0.9e9, "0.9GHz"]
eep_files = [eep_file1, eep_file2]

Expand Down

0 comments on commit 87ee574

Please sign in to comment.