Skip to content

Commit c603f27

Browse files
authored
fix bug velocity unit (#1130)
* Comment deprecated tests * UPdate lsdyna tests for velocity units * Remove unneeded import * Update tests and check version for lsdyna tests
1 parent 57b6b54 commit c603f27

File tree

1 file changed

+7
-2
lines changed

1 file changed

+7
-2
lines changed

tests/test_lsdyna.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22
import pytest
33
import conftest
44
from ansys.dpf import core as dpf
5+
from ansys.dpf.core.check_version import server_meet_version
56

67

78
@pytest.mark.skipif(
@@ -72,8 +73,12 @@ def test_lsdyna_generic(d3plot_files):
7273
global_velocity_model = model.results.global_velocity().eval()
7374

7475
assert np.allclose(global_velocity_fc[0].data[0], global_velocity_model[0].data[0])
75-
# assert global_velocity_fc[0].unit == "mm*Hz"
76-
# assert global_velocity_model[0].unit == "mm*Hz"
76+
if server_meet_version("7.1", global_velocity_op._server):
77+
assert global_velocity_fc[0].unit == "mm/s"
78+
assert global_velocity_model[0].unit == "mm/s"
79+
else:
80+
assert global_velocity_fc[0].unit == "mm*Hz"
81+
assert global_velocity_model[0].unit == "mm*Hz"
7782

7883
# ------------------------------------------------- Initial Coordinates
7984

0 commit comments

Comments
 (0)