Skip to content

Commit be0c93f

Browse files
committed
test large streaming
1 parent e121131 commit be0c93f

File tree

4 files changed

+14
-4
lines changed

4 files changed

+14
-4
lines changed

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55

66
from setuptools import setup
77

8-
install_requires = ["packaging", "psutil", "tqdm", "numpy", "ansys-dpf-gate"]
8+
install_requires = ["packaging", "psutil", "tqdm", "numpy", "ansys-dpf-gate>0.1.*"]
99

1010
# Get version from version info
1111
filepath = os.path.dirname(__file__)

tests/conftest.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -358,8 +358,8 @@ def server_clayer(request):
358358

359359

360360
@pytest.fixture()
361-
def restore_awp_root(request):
362-
awp_root_name = "AWP_ROOT" + core._version.__ansys_version__
361+
def restore_awp_root():
362+
awp_root_name = "AWP_ROOT" + core.misc.__ansys_version__
363363
awp_root_save = os.environ.get(awp_root_name, None)
364364
yield
365365
# restore awp_root

tests/test_launcher.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ def test_start_local_wrong_ansys_path(self, server_config):
182182
@staticmethod
183183
def test_launch_server_full_path(server_config):
184184
ansys_path = os.environ.get(
185-
"AWP_ROOT" + core._version.__ansys_version__, core.misc.find_ansys()
185+
"AWP_ROOT" + core.misc.__ansys_version__, core.misc.find_ansys()
186186
)
187187
if os.name == "nt":
188188
path = os.path.join(ansys_path, "aisol", "bin", "winx64")

tests/test_stringfield.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,13 @@ def test_entity_data_string_field(server_type):
7575
assert f_vec.get_entity_data_by_id(2) == ["wat"]
7676
assert f_vec.get_entity_data_by_id(3) == ["gaz"]
7777

78+
79+
@conftest.raises_for_servers_version_under("5.0")
80+
def test_stream_large_data_string_field(server_type):
81+
nstring = 1000000
82+
field = dpf.core.StringField(nentities=nstring, server=server_type)
83+
data = []
84+
for i in range(0, nstring):
85+
data.append("bla")
86+
field.data = data
87+
assert field.data == data

0 commit comments

Comments
 (0)