diff --git a/python/tests/test_example.py b/python/tests/test_example.py index a8747f822f7..c604ed9aa45 100644 --- a/python/tests/test_example.py +++ b/python/tests/test_example.py @@ -218,6 +218,7 @@ def test_example( ), f"Please provide value for `{key}` for testing `{example['file']}`" filepath = Path(example["file"]) + original_source = filepath.read_text(encoding="utf-8") code = filepath.read_text(encoding="utf-8") if plugin_to_test != "lyzr": @@ -236,10 +237,10 @@ def test_example( # Wait for 2 minutes for example to run proc.wait(timeout=180) + filepath.write_text(original_source, encoding="utf-8") + # Check if process exited with success - assert proc.returncode == 0, ( - t.cast(t.IO[bytes], proc.stderr).read().decode(encoding="utf-8") - ) + assert proc.returncode == 0 # Validate output output = (