From 45b7f0c017031623b33ff855fdd10a6bcb226225 Mon Sep 17 00:00:00 2001 From: Christoph Pokorny Date: Wed, 10 Jul 2024 13:27:10 +0200 Subject: [PATCH] Functional test testing --- tests/functional/test_parquet2hdf5.py | 19 +++++++++++-------- 1 file changed, 11 insertions(+), 8 deletions(-) diff --git a/tests/functional/test_parquet2hdf5.py b/tests/functional/test_parquet2hdf5.py index eb5c5f9..aab4e3f 100644 --- a/tests/functional/test_parquet2hdf5.py +++ b/tests/functional/test_parquet2hdf5.py @@ -8,11 +8,14 @@ def test_parquet2hdf5(): - """Test if parquet2hdf5 function is available. Will raise an FileNotFoundError if not.""" - with subprocess.Popen( - ["parquet2hdf5", "--version"], - stdout=subprocess.PIPE, - stderr=subprocess.STDOUT, - env={"PATH": os.getenv("PATH", "")}, - ) as proc: - print("parquet2hdf5 v" + proc.communicate()[0].decode()) + """Test if parquet2hdf5 function is available.""" + try: + with subprocess.Popen( + ["parquet2hdf5", "--version"], + stdout=subprocess.PIPE, + stderr=subprocess.STDOUT, + env={"PATH": os.getenv("PATH", "")}, + ) as proc: + print("parquet2hdf5 v" + proc.communicate()[0].decode()) + except FileNotFoundError as e: + assert False, str(e) + f"\nPATH={os.getenv("PATH", "")}"