Skip to content
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions doc/changelog.d/4868.test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Add test for sequence
Comment thread
Gobot1234 marked this conversation as resolved.
17 changes: 17 additions & 0 deletions tests/test_settings_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
# SOFTWARE.

from collections import UserList
import warnings

from conftest import SKIP_INVESTIGATING
Expand All @@ -29,6 +30,7 @@
from ansys.fluent.core import config
from ansys.fluent.core.examples import download_file
from ansys.fluent.core.pyfluent_warnings import PyFluentUserWarning
from ansys.fluent.core.session_solver import Solver
Comment thread
Gobot1234 marked this conversation as resolved.
from ansys.fluent.core.solver import VelocityInlets, Viscous
from ansys.fluent.core.solver.flobject import (
DeprecatedSettingWarning,
Expand Down Expand Up @@ -860,3 +862,18 @@ def test_read_only_command_execution(mixing_elbow_case_session):
assert contour.display.is_read_only() is True
with pytest.raises(ReadOnlyActionError):
contour.display()


def test_copy_accepts_sequence_types(mixing_elbow_settings_session: Solver):
solver = mixing_elbow_settings_session
bc = solver.settings.setup.boundary_conditions.velocity_inlet["hot-inlet"]
bc.momentum.velocity = 1.0

seq = UserList(["cold-inlet"])
solver.settings.setup.boundary_conditions.copy(from_="hot-inlet", to=seq)
assert (
solver.settings.setup.boundary_conditions.velocity_inlet[
"cold-inlet"
].momentum.velocity.value()
== 1.0
)
Comment thread
Gobot1234 marked this conversation as resolved.
Outdated
Loading