Skip to content

Commit

Permalink
Correction of typo
Browse files Browse the repository at this point in the history
  • Loading branch information
ansnfernand committed Mar 4, 2024
1 parent 3e8ff5e commit 04a4397
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 15 deletions.
4 changes: 2 additions & 2 deletions src/ansys/sherlock/core/parts.py
Original file line number Diff line number Diff line change
Expand Up @@ -806,7 +806,7 @@ def update_parts_from_AVL(
LOG.error(str(e))
raise e

def update_part_lists_properties(self, project, cca_name, part_properties):
def update_parts_list_properties(self, project, cca_name, part_properties):
"""
Update one or more properties of one or more parts in a parts list.
Expand Down Expand Up @@ -839,7 +839,7 @@ def update_part_lists_properties(self, project, cca_name, part_properties):
--------
>>> from ansys.sherlock.core.launcher import launch_sherlock
>>> sherlock = launch_sherlock()
>>> sherlock.parts.update_part_lists_properties(
>>> sherlock.parts.update_parts_list_properties(
"Test",
"Card",
[
Expand Down
26 changes: 13 additions & 13 deletions tests/test_parts.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def test_all():

helper_test_update_parts_list(parts)
time.sleep(1)
helper_test_update_part_lists_properties(parts)
helper_test_update_parts_list_properties(parts)
time.sleep(1)
helper_test_update_parts_from_AVL(parts)
helper_test_update_parts_locations(parts)
Expand Down Expand Up @@ -675,10 +675,10 @@ def helper_test_get_part_location(parts):
assert str(e) == "Get part location error: Location unit is invalid."


def helper_test_update_part_lists_properties(parts):
"""Test update_part_lists_properties API"""
def helper_test_update_parts_list_properties(parts):
"""Test update_parts_list_properties API"""
try:
parts.update_part_lists_properties(
parts.update_parts_list_properties(
"",
"CCA_Name",
[{"ref_des": ["C1"], "properties": [{"name": "partType", "value": "RESISTOR"}]}],
Expand All @@ -690,7 +690,7 @@ def helper_test_update_part_lists_properties(parts):
)

try:
parts.update_part_lists_properties(
parts.update_parts_list_properties(
"Test",
"",
[{"ref_des": ["C1"], "properties": [{"name": "partType", "value": "RESISTOR"}]}],
Expand All @@ -700,15 +700,15 @@ def helper_test_update_part_lists_properties(parts):
assert str(e.str_itr()) == "['Update parts list properties error: CCA name is invalid.']"

try:
parts.update_part_lists_properties("Test", "CCA_Name", [])
parts.update_parts_list_properties("Test", "CCA_Name", [])
pytest.fail("No exception raised when using an invalid parameter")
except SherlockUpdatePartsListPropertiesError as e:
assert str(e.str_itr()) == (
"['Update parts list properties error: Part properties are missing.']"
)

try:
parts.update_part_lists_properties(
parts.update_parts_list_properties(
"Test",
"CCA_name",
[
Expand All @@ -727,7 +727,7 @@ def helper_test_update_part_lists_properties(parts):
)

try:
parts.update_part_lists_properties(
parts.update_parts_list_properties(
"Test",
"CCA_name",
[{"ref_des": "C1", "properties": [{"name": "partType", "value": "RESISTOR"}]}],
Expand All @@ -740,7 +740,7 @@ def helper_test_update_part_lists_properties(parts):
)

try:
parts.update_part_lists_properties(
parts.update_parts_list_properties(
"Test",
"CCA_name",
[
Expand All @@ -758,7 +758,7 @@ def helper_test_update_part_lists_properties(parts):
)

try:
parts.update_part_lists_properties(
parts.update_parts_list_properties(
"Test",
"CCA_name",
[{"ref_des": ["C1"], "properties": [{"name": "", "value": "RESISTOR"}]}],
Expand All @@ -770,7 +770,7 @@ def helper_test_update_part_lists_properties(parts):
)

try:
parts.update_part_lists_properties(
parts.update_parts_list_properties(
"Test",
"CCA_name",
[{"ref_des": ["C1"], "properties": [{"name": "partType", "value": ""}]}],
Expand All @@ -785,7 +785,7 @@ def helper_test_update_part_lists_properties(parts):
return

try:
parts.update_part_lists_properties(
parts.update_parts_list_properties(
"Test",
"CCA_name",
[{"ref_des": ["C1"], "properties": [{"name": "partType", "value": "RESISTOR"}]}],
Expand All @@ -796,7 +796,7 @@ def helper_test_update_part_lists_properties(parts):

if parts._is_connection_up():
try:
result = parts.update_part_lists_properties(
result = parts.update_parts_list_properties(
"Tutorial Project",
"Main Board",
[{"ref_des": ["C1"], "properties": [{"name": "partType", "value": "RESISTOR"}]}],
Expand Down

0 comments on commit 04a4397

Please sign in to comment.