From dd587afcab95c8fc9e51c8abfef9653b9b6f74ea Mon Sep 17 00:00:00 2001 From: "Jan C. Brammer" Date: Fri, 25 Oct 2024 11:23:03 +0000 Subject: [PATCH] Fix name Return executable's standard error as stderr, not stdout --- INCHI-1-TEST/tests/test_executable/conftest.py | 4 ++-- INCHI-1-TEST/tests/test_executable/test_github_40.py | 2 +- INCHI-1-TEST/tests/test_executable/test_github_52.py | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/INCHI-1-TEST/tests/test_executable/conftest.py b/INCHI-1-TEST/tests/test_executable/conftest.py index ed9f515..77d3774 100644 --- a/INCHI-1-TEST/tests/test_executable/conftest.py +++ b/INCHI-1-TEST/tests/test_executable/conftest.py @@ -17,7 +17,7 @@ def pytest_addoption(parser): @dataclass class InchiResult: - stdout: str + stderr: str inchi: str aux_info: str @@ -66,7 +66,7 @@ def _run_inchi_exe(molfile: str, args: str = "") -> InchiResult: output = output_path.read_text() return InchiResult( - stdout=result.stderr, + stderr=result.stderr, # contains log inchi=parse_inchi_from_executable_output(output), aux_info=parse_aux_info_from_executable_output(output), ) diff --git a/INCHI-1-TEST/tests/test_executable/test_github_40.py b/INCHI-1-TEST/tests/test_executable/test_github_40.py index 4c840b3..47b5c00 100644 --- a/INCHI-1-TEST/tests/test_executable/test_github_40.py +++ b/INCHI-1-TEST/tests/test_executable/test_github_40.py @@ -108,4 +108,4 @@ def molfile(): def test_spiro_compound_chiral(molfile, run_inchi_exe): result = run_inchi_exe(molfile) - assert "Warning (Not chiral) structure #1." not in result.stdout + assert "Warning (Not chiral) structure #1." not in result.stderr diff --git a/INCHI-1-TEST/tests/test_executable/test_github_52.py b/INCHI-1-TEST/tests/test_executable/test_github_52.py index 66c3f6e..0d2802d 100644 --- a/INCHI-1-TEST/tests/test_executable/test_github_52.py +++ b/INCHI-1-TEST/tests/test_executable/test_github_52.py @@ -41,7 +41,7 @@ def test_empty_bondblock(molfile_empty_bondblock, run_inchi_exe): assert ( "Error 71 (no InChI; Error: No V3000 CTAB end marker) inp structure #1." - not in result.stdout + not in result.stderr ) @@ -50,5 +50,5 @@ def test_no_bondblock(molfile_no_bondblock, run_inchi_exe): assert ( "Error 71 (no InChI; Error: No V3000 CTAB end marker) inp structure #1." - not in result.stdout + not in result.stderr )