From 472d2cded34740c9e2eae4a669b53e2be8eb0b9f Mon Sep 17 00:00:00 2001 From: bruntib Date: Fri, 11 Nov 2022 13:05:56 +0100 Subject: [PATCH] [test] Fix fixit test In some environments/Python versions the standard input given to subprocess.Popen is handled differently. This fix uses the standard input parameter in a way that it works in every environment. --- analyzer/tests/functional/fixit/test_fixit.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/analyzer/tests/functional/fixit/test_fixit.py b/analyzer/tests/functional/fixit/test_fixit.py index d83c697f93..8e71951ed7 100644 --- a/analyzer/tests/functional/fixit/test_fixit.py +++ b/analyzer/tests/functional/fixit/test_fixit.py @@ -396,10 +396,11 @@ def content_hash(filename): fixit_cmd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, + stdin=subprocess.PIPE, cwd=self.test_workspace, encoding="utf-8", errors="ignore") - process.communicate() + process.communicate(input='[]') new_hash_1 = content_hash(source_file1) new_hash_2 = content_hash(source_file2)