chore: update CHANGELOG for v0.11.7 (#889) #2346
13 tests run, 2 passed, 0 skipped, 11 failed.
Annotations
Check failure on line 248 in tests/embedding/test_app.py
github-actions / Test Report 3.10
test_app.test_private_appdata
AssertionError: assert 'ShowTriad value is True' in ''
Raw output
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672f897e0>
rootdir = PosixPath('/__w/pymechanical/pymechanical')
@pytest.mark.embedding_scripts
@pytest.mark.python_env
def test_private_appdata(pytestconfig, run_subprocess, rootdir):
"""Test embedded instance does not save ShowTriad using a test-scoped Python environment."""
version = pytestconfig.getoption("ansys_version")
embedded_py = os.path.join(rootdir, "tests", "scripts", "run_embedded_app.py")
run_subprocess([sys.executable, embedded_py, version, "True", "Set"])
stdout, _ = run_subprocess([sys.executable, embedded_py, version, "True", "Run"])
stdout = stdout.decode()
> assert "ShowTriad value is True" in stdout
E AssertionError: assert 'ShowTriad value is True' in ''
tests/embedding/test_app.py:248: AssertionError
Check failure on line 265 in tests/embedding/test_app.py
github-actions / Test Report 3.10
test_app.test_normal_appdata
AssertionError: assert 'ShowTriad value is False' in ''
Raw output
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672f89510>
rootdir = PosixPath('/__w/pymechanical/pymechanical')
@pytest.mark.embedding_scripts
@pytest.mark.python_env
def test_normal_appdata(pytestconfig, run_subprocess, rootdir):
"""Test embedded instance saves ShowTriad value using a test-scoped Python environment."""
version = pytestconfig.getoption("ansys_version")
embedded_py = os.path.join(rootdir, "tests", "scripts", "run_embedded_app.py")
run_subprocess([sys.executable, embedded_py, version, "False", "Set"])
stdout, _ = run_subprocess([sys.executable, embedded_py, version, "False", "Run"])
run_subprocess([sys.executable, embedded_py, version, "False", "Reset"])
stdout = stdout.decode()
# Assert ShowTriad was set to False for regular embedded session
> assert "ShowTriad value is False" in stdout
E AssertionError: assert 'ShowTriad value is False' in ''
tests/embedding/test_app.py:265: AssertionError
Check failure on line 285 in tests/embedding/test_app.py
github-actions / Test Report 3.10
test_app.test_building_gallery
AssertionError: assert 'Cannot have more than one embedded mechanical instance' in '\n******************************************************************************\n*** A fatal error has occurred within AnsysWBU.exe and it must be closed...***\n******************************************************************************\n\n'
Raw output
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672f8b910>
rootdir = PosixPath('/__w/pymechanical/pymechanical')
@pytest.mark.embedding_scripts
def test_building_gallery(pytestconfig, run_subprocess, rootdir):
"""Test for building gallery check.
When building the gallery, each example file creates another instance of the app.
When the BUILDING_GALLERY flag is enabled, only one instance is kept.
This is to test the bug fixed in https://github.com/ansys/pymechanical/pull/784
and will fail on PyMechanical version 0.11.0
"""
version = pytestconfig.getoption("ansys_version")
embedded_gallery_py = os.path.join(rootdir, "tests", "scripts", "build_gallery_test.py")
_, stderr = run_subprocess([sys.executable, embedded_gallery_py, version, "False"], None, False)
stderr = stderr.decode()
# Assert Exception
> assert "Cannot have more than one embedded mechanical instance" in stderr
E AssertionError: assert 'Cannot have more than one embedded mechanical instance' in '\n******************************************************************************\n*** A fatal error has occurred within AnsysWBU.exe and it must be closed...***\n******************************************************************************\n\n'
tests/embedding/test_app.py:285: AssertionError
Check failure on line 50 in tests/embedding/test_background.py
github-actions / Test Report 3.10
test_background.test_background_app_multiple_instances
AssertionError: assert '@@success@@' in ''
Raw output
rootdir = PosixPath('/__w/pymechanical/pymechanical')
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672f8b0a0>
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
@pytest.mark.embedding_scripts
def test_background_app_multiple_instances(rootdir, run_subprocess, pytestconfig):
"""Multiple instances of background app can be used."""
> stderr = _run_background_app_test(
run_subprocess, rootdir, pytestconfig, "multiple_instances", True
)
tests/embedding/test_background.py:80:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/embedding/test_background.py:72: in _run_background_app_test
_assert_success(stdout, pass_expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stdout = '', pass_expected = True
def _assert_success(stdout: str, pass_expected: bool) -> bool:
"""Check whether the process ran to completion from its stdout
Duplicate of the `_assert_success` function in test_logger.py
"""
if pass_expected:
> assert "@@success@@" in stdout
E AssertionError: assert '@@success@@' in ''
tests/embedding/test_background.py:50: AssertionError
Check failure on line 95 in tests/embedding/test_background.py
github-actions / Test Report 3.10
test_background.test_background_app_use_stopped
AssertionError: assert 'Cannot use background app after stopping it' in '\n******************************************************************************\n*** A fatal error has occurred within AnsysWBU.exe and it must be closed...***\n******************************************************************************\n\n'
Raw output
rootdir = PosixPath('/__w/pymechanical/pymechanical')
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672f8b880>
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
@pytest.mark.embedding_scripts
def test_background_app_use_stopped(rootdir, run_subprocess, pytestconfig):
"""Multiple instances of background app cannot be used after an instance is stopped."""
stderr = _run_background_app_test(
run_subprocess, rootdir, pytestconfig, "test_background_app_use_stopped", False
)
> assert "Cannot use background app after stopping it" in stderr
E AssertionError: assert 'Cannot use background app after stopping it' in '\n******************************************************************************\n*** A fatal error has occurred within AnsysWBU.exe and it must be closed...***\n******************************************************************************\n\n'
tests/embedding/test_background.py:95: AssertionError
Check failure on line 104 in tests/embedding/test_background.py
github-actions / Test Report 3.10
test_background.test_background_app_initialize_stopped
AssertionError: assert 'Cannot initialize a BackgroundApp once it has been stopped!' in '\n******************************************************************************\n*** A fatal error has occurred within AnsysWBU.exe and it must be closed...***\n******************************************************************************\n\n'
Raw output
rootdir = PosixPath('/__w/pymechanical/pymechanical')
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672f10790>
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
@pytest.mark.embedding_scripts
def test_background_app_initialize_stopped(rootdir, run_subprocess, pytestconfig):
"""Multiple instances of background app cannot be used after an instance is stopped."""
stderr = _run_background_app_test(
run_subprocess, rootdir, pytestconfig, "test_background_app_initialize_stopped", False
)
> assert "Cannot initialize a BackgroundApp once it has been stopped!" in stderr
E AssertionError: assert 'Cannot initialize a BackgroundApp once it has been stopped!' in '\n******************************************************************************\n*** A fatal error has occurred within AnsysWBU.exe and it must be closed...***\n******************************************************************************\n\n'
tests/embedding/test_background.py:104: AssertionError
Check failure on line 72 in tests/embedding/test_logger.py
github-actions / Test Report 3.10
test_logger.test_logging_write_info_after_initialize_with_error_level
AssertionError: assert '@@success@@' in ''
Raw output
rootdir = PosixPath('/__w/pymechanical/pymechanical')
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672f108b0>
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
@pytest.mark.embedding_scripts
def test_logging_write_info_after_initialize_with_error_level(
rootdir, run_subprocess, pytestconfig
):
"""Test that no output is written when an info is logged when configured at the error level."""
> stderr = _run_embedding_log_test(
run_subprocess, rootdir, pytestconfig, "log_info_after_initialize_with_error_level"
)
tests/embedding/test_logger.py:115:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/embedding/test_logger.py:97: in _run_embedding_log_test
_assert_success(stdout, pass_expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stdout = '', pass_expected = True
def _assert_success(stdout: str, pass_expected: bool) -> int:
"""Asserts the outcome of the process matches pass_expected"""
# HACK! On linux, due to bug #85, there is always a crash on shutdown
# so instead there's a print("success") that happens after the test
# function runs that will only be executed if the function doesn't
# throw. To check for the subprocess success, ensure that the stdout
# has "@@success@@" (a value written there in the subprocess after the
# test function runs)
if pass_expected:
> assert "@@success@@" in stdout
E AssertionError: assert '@@success@@' in ''
tests/embedding/test_logger.py:72: AssertionError
Check failure on line 72 in tests/embedding/test_logger.py
github-actions / Test Report 3.10
test_logger.test_addin_configuration[Mechanical]
AssertionError: assert '@@success@@' in ''
Raw output
rootdir = PosixPath('/__w/pymechanical/pymechanical')
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672f10040>
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
addin_configuration = 'Mechanical'
@pytest.mark.parametrize("addin_configuration", ["Mechanical", "WorkBench"])
@pytest.mark.embedding_scripts
@pytest.mark.minimum_version(241)
def test_addin_configuration(rootdir, run_subprocess, pytestconfig, addin_configuration):
"""Test that mechanical can start with both the Mechanical and WorkBench configuration."""
> stderr = _run_embedding_log_test(
run_subprocess, rootdir, pytestconfig, f"log_configuration_{addin_configuration}"
)
tests/embedding/test_logger.py:126:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/embedding/test_logger.py:97: in _run_embedding_log_test
_assert_success(stdout, pass_expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stdout = '', pass_expected = True
def _assert_success(stdout: str, pass_expected: bool) -> int:
"""Asserts the outcome of the process matches pass_expected"""
# HACK! On linux, due to bug #85, there is always a crash on shutdown
# so instead there's a print("success") that happens after the test
# function runs that will only be executed if the function doesn't
# throw. To check for the subprocess success, ensure that the stdout
# has "@@success@@" (a value written there in the subprocess after the
# test function runs)
if pass_expected:
> assert "@@success@@" in stdout
E AssertionError: assert '@@success@@' in ''
tests/embedding/test_logger.py:72: AssertionError
Check failure on line 72 in tests/embedding/test_logger.py
github-actions / Test Report 3.10
test_logger.test_addin_configuration[WorkBench]
AssertionError: assert '@@success@@' in ''
Raw output
rootdir = PosixPath('/__w/pymechanical/pymechanical')
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672f8b0a0>
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
addin_configuration = 'WorkBench'
@pytest.mark.parametrize("addin_configuration", ["Mechanical", "WorkBench"])
@pytest.mark.embedding_scripts
@pytest.mark.minimum_version(241)
def test_addin_configuration(rootdir, run_subprocess, pytestconfig, addin_configuration):
"""Test that mechanical can start with both the Mechanical and WorkBench configuration."""
> stderr = _run_embedding_log_test(
run_subprocess, rootdir, pytestconfig, f"log_configuration_{addin_configuration}"
)
tests/embedding/test_logger.py:126:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/embedding/test_logger.py:97: in _run_embedding_log_test
_assert_success(stdout, pass_expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stdout = '', pass_expected = True
def _assert_success(stdout: str, pass_expected: bool) -> int:
"""Asserts the outcome of the process matches pass_expected"""
# HACK! On linux, due to bug #85, there is always a crash on shutdown
# so instead there's a print("success") that happens after the test
# function runs that will only be executed if the function doesn't
# throw. To check for the subprocess success, ensure that the stdout
# has "@@success@@" (a value written there in the subprocess after the
# test function runs)
if pass_expected:
> assert "@@success@@" in stdout
E AssertionError: assert '@@success@@' in ''
tests/embedding/test_logger.py:72: AssertionError
Check failure on line 72 in tests/embedding/test_logger.py
github-actions / Test Report 3.10
test_logger.test_logging_write_error_after_initialize_with_info_level
AssertionError: assert '@@success@@' in ''
Raw output
rootdir = PosixPath('/__w/pymechanical/pymechanical')
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672fcb6d0>
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
@pytest.mark.embedding_scripts
def test_logging_write_error_after_initialize_with_info_level(
rootdir, run_subprocess, pytestconfig
):
"""Test that output is written when an error is logged when configured at the info level."""
> stderr = _run_embedding_log_test(
run_subprocess, rootdir, pytestconfig, "log_error_after_initialize_with_info_level"
)
tests/embedding/test_logger.py:137:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
tests/embedding/test_logger.py:97: in _run_embedding_log_test
_assert_success(stdout, pass_expected)
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stdout = '', pass_expected = True
def _assert_success(stdout: str, pass_expected: bool) -> int:
"""Asserts the outcome of the process matches pass_expected"""
# HACK! On linux, due to bug #85, there is always a crash on shutdown
# so instead there's a print("success") that happens after the test
# function runs that will only be executed if the function doesn't
# throw. To check for the subprocess success, ensure that the stdout
# has "@@success@@" (a value written there in the subprocess after the
# test function runs)
if pass_expected:
> assert "@@success@@" in stdout
E AssertionError: assert '@@success@@' in ''
tests/embedding/test_logger.py:72: AssertionError
Check failure on line 72 in tests/embedding/test_logger.py
github-actions / Test Report 3.10
test_logger.test_logging_level_before_and_after_initialization
AssertionError: assert '@@success@@' in ''
Raw output
rootdir = PosixPath('/__w/pymechanical/pymechanical')
run_subprocess = <function run_subprocess.<locals>.func at 0x7f1672fc92d0>
pytestconfig = <_pytest.config.Config object at 0x7f1674d6f040>
@pytest.mark.embedding_scripts
def test_logging_level_before_and_after_initialization(rootdir, run_subprocess, pytestconfig):
"""Test logging level API before and after initialization."""
stdout, stderr = _run_embedding_log_test_process(
rootdir, run_subprocess, pytestconfig, "log_check_can_log_message"
)
stdout = stdout.decode()
stderr = stderr.decode()
> _assert_success(stdout, True)
tests/embedding/test_logger.py:151:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
stdout = '', pass_expected = True
def _assert_success(stdout: str, pass_expected: bool) -> int:
"""Asserts the outcome of the process matches pass_expected"""
# HACK! On linux, due to bug #85, there is always a crash on shutdown
# so instead there's a print("success") that happens after the test
# function runs that will only be executed if the function doesn't
# throw. To check for the subprocess success, ensure that the stdout
# has "@@success@@" (a value written there in the subprocess after the
# test function runs)
if pass_expected:
> assert "@@success@@" in stdout
E AssertionError: assert '@@success@@' in ''
tests/embedding/test_logger.py:72: AssertionError