From 2335569cbac237cbf62fb3b3f7a36a7045dc1ee9 Mon Sep 17 00:00:00 2001 From: dkunhamb Date: Wed, 20 Nov 2024 17:18:26 -0600 Subject: [PATCH 1/2] test coverage for subprocess --- pyproject.toml | 2 ++ tests/embedding/test_app.py | 4 +++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f3bfd937c..12977fd95 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -111,6 +111,8 @@ src_paths = ["doc", "src", "tests"] [tool.coverage.run] relative_files = true source = ["ansys.mechanical"] +branch = true +parallel = true [tool.coverage.report] show_missing = true diff --git a/tests/embedding/test_app.py b/tests/embedding/test_app.py index 9c37b8139..afe3ed32c 100644 --- a/tests/embedding/test_app.py +++ b/tests/embedding/test_app.py @@ -253,7 +253,9 @@ def test_building_gallery(pytestconfig, run_subprocess, rootdir): embedded_gallery_py = os.path.join(rootdir, "tests", "scripts", "build_gallery_test.py") process, stdout, stderr = run_subprocess( - [sys.executable, embedded_gallery_py, version, "False"], None, False + [sys.executable, "-m", "coverage", "run", embedded_gallery_py, version, "False"], + None, + False, ) stderr = stderr.decode() From ad0be51474ba0a6496656325aee2347d78cf0c84 Mon Sep 17 00:00:00 2001 From: pyansys-ci-bot <92810346+pyansys-ci-bot@users.noreply.github.com> Date: Wed, 20 Nov 2024 23:20:10 +0000 Subject: [PATCH 2/2] chore: adding changelog file 987.test.md [dependabot-skip] --- doc/changelog.d/987.test.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 doc/changelog.d/987.test.md diff --git a/doc/changelog.d/987.test.md b/doc/changelog.d/987.test.md new file mode 100644 index 000000000..49025ccc0 --- /dev/null +++ b/doc/changelog.d/987.test.md @@ -0,0 +1 @@ +coverage for subprocess \ No newline at end of file