diff --git a/doc/source/libuserd_documentation.rst b/doc/source/libuserd_documentation.rst index ff9fb92ceee..e8aa985d4bb 100644 --- a/doc/source/libuserd_documentation.rst +++ b/doc/source/libuserd_documentation.rst @@ -37,4 +37,6 @@ uses a USERD interface can be read using this API. ansys.pyensight.core.libuserd.Query ansys.pyensight.core.libuserd.LibUserdError ansys.pyensight.core.libuserd.ErrorCodes + ansys.pyensight.core.libuserd.UpdateHints + ansys.pyensight.core.libuserd.RankValues diff --git a/tests/unit_tests/test_session.py b/tests/unit_tests/test_session.py index fdbae234ca7..2329db3d1b9 100644 --- a/tests/unit_tests/test_session.py +++ b/tests/unit_tests/test_session.py @@ -1,4 +1,5 @@ """Unit tests for session.py""" +import fnmatch import platform from unittest import mock import webbrowser @@ -221,24 +222,21 @@ def test_convert_ctor(mocked_session, mocker): assert value == "session.ensight.objs.ENS_GLOBALS(session, 221)" cmd = mocker.patch.object(session, "cmd", return_value=0) value = session._convert_ctor("Class: ENS_PART, desc: 'Sphere', CvfObjID: 1078, cached:no") - # Note: 1610612795 == ensight.objs.enums.PARTTYPE - assert ( - value - == "session.ensight.objs.ENS_PART_MODEL(session, 1078,attr_id=1610612795, attr_value=0)" + # Note: attr_id=ensight.objs.enums.PARTTYPE + assert fnmatch.fnmatch( + value, "session.ensight.objs.ENS_PART_MODEL(session, 1078,attr_id=*, attr_value=0)" ) cmd.return_value = 3 value = session._convert_ctor("Class: ENS_ANNOT, desc: 'Pressure', CvfObjID: 4761, cached:no") - # Note: 1610612996 == ensight.objs.enums.ANNOTTYPE - assert ( - value - == "session.ensight.objs.ENS_ANNOT_LGND(session, 4761,attr_id=1610612996, attr_value=3)" + # Note: attr_id=ensight.objs.enums.ANNOTTYPE + assert fnmatch.fnmatch( + value, "session.ensight.objs.ENS_ANNOT_LGND(session, 4761,attr_id=*, attr_value=3)" ) cmd.return_value = 6 value = session._convert_ctor("Class: ENS_TOOL, desc: 'Sphere', CvfObjID: 763, cached:no") - # Note: 1610613036 == ensight.objs.enums.TOOLTYPE - assert ( - value - == "session.ensight.objs.ENS_TOOL_SPHERE(session, 763,attr_id=1610613036, attr_value=6)" + # Note: attr_id=ensight.objs.enums.TOOLTYPE + assert fnmatch.fnmatch( + value, "session.ensight.objs.ENS_TOOL_SPHERE(session, 763,attr_id=*, attr_value=6)" ) session._ensobj_hash = {i: i for i in range(10000000)} value = session._convert_ctor("Class: ENS_GLOBALS, CvfObjID: 221, cached:yes")