Skip to content

Commit

Permalink
TESTS: Fix test
Browse files Browse the repository at this point in the history
  • Loading branch information
SMoraisAnsys committed Jan 29, 2025
1 parent 5ddb80c commit 6f49bae
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion tests/unit/test_maxwell_3d.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,9 @@
from unittest.mock import MagicMock
from unittest.mock import patch

from ansys.aedt.core.generic.errors import AEDTRuntimeError
from ansys.aedt.core.maxwell import Maxwell3d
import pytest


@patch.object(Maxwell3d, "solution_type", "Transient")
Expand All @@ -38,4 +40,5 @@ def test_maxwell_3d_assign_resistive_sheet_failure(mock_boundary_object, maxwell
maxwell._modeler = MagicMock()
maxwell._logger = MagicMock()

assert not maxwell.assign_resistive_sheet(None, None)
with pytest.raises(AEDTRuntimeError, match=r"Boundary ResistiveSheet_\w+ was not created\."):
maxwell.assign_resistive_sheet(None, None)

0 comments on commit 6f49bae

Please sign in to comment.