From 7d1464011b38da6b015e2fe798016c01afc02bd3 Mon Sep 17 00:00:00 2001 From: Camilo Diaz Date: Mon, 17 Jun 2024 10:51:21 -0400 Subject: [PATCH] adding parameter in pytest to print in stdout --- .github/workflows/linux_unit_test.yml | 2 +- hnn_core/tests/test_parallel_backends.py | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/linux_unit_test.yml b/.github/workflows/linux_unit_test.yml index 168d6206b..d758f0bb5 100644 --- a/.github/workflows/linux_unit_test.yml +++ b/.github/workflows/linux_unit_test.yml @@ -66,7 +66,7 @@ jobs: - name: Test with pytest shell: bash -el {0} run: | - python -m pytest ./hnn_core/tests/test_parallel_backends.py --cov=hnn_core --cov-report=xml + python -m pytest ./hnn_core/tests/test_parallel_backends.py --cov=hnn_core --cov-report=xml -s # - name: Upload coverage to Codecov # shell: bash -el {0} diff --git a/hnn_core/tests/test_parallel_backends.py b/hnn_core/tests/test_parallel_backends.py index b6e9f7ed6..b51c0cfa3 100644 --- a/hnn_core/tests/test_parallel_backends.py +++ b/hnn_core/tests/test_parallel_backends.py @@ -256,7 +256,9 @@ def test_mpi_failure(run_hnn_core_fixture): assert "MPI processes are unable to reach each other" in stdout expected_string = "Child process failed unexpectedly" - assert len(record) == 1 + print(record[0].message.args[0]) assert record[0].message.args[0] == expected_string + assert len(record) == 1 + del environ["OMPI_MCA_btl"]