summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleš Matěj <amatej@redhat.com>2021-04-15 13:43:31 +0200
committerNeal Gompa (ニール・ゴンパ) <ngompa13@gmail.com>2021-04-17 13:39:25 -0400
commited0c0c8f1b5935971cafad3fdc91b16203a7a3f8 (patch)
tree9163bf0a6c8029a284af72bae932e8ff941d6c69
parent8eff6ed99f5fd0ba844cb8513963435caab5fd3c (diff)
Fix valgrind warnings caused by subprocess calls.
More details in: https://github.com/rpm-software-management/createrepo_c/issues/259
-rw-r--r--tests/python/tests/test_crfile.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/tests/python/tests/test_crfile.py b/tests/python/tests/test_crfile.py
index ee92516..bf13f89 100644
--- a/tests/python/tests/test_crfile.py
+++ b/tests/python/tests/test_crfile.py
@@ -102,7 +102,7 @@ class TestCaseCrFile(unittest.TestCase):
f.close()
import subprocess
- with subprocess.Popen(["unxz", "--stdout", path], stdout=subprocess.PIPE) as p:
+ with subprocess.Popen(["unxz", "--stdout", path], stdout=subprocess.PIPE, close_fds=False) as p:
content = p.stdout.read().decode('utf-8')
self.assertEqual(content, "foobar")
@@ -118,6 +118,6 @@ class TestCaseCrFile(unittest.TestCase):
f.close()
import subprocess
- with subprocess.Popen(["unzck", "--stdout", path], stdout=subprocess.PIPE) as p:
+ with subprocess.Popen(["unzck", "--stdout", path], stdout=subprocess.PIPE, close_fds=False) as p:
content = p.stdout.read().decode('utf-8')
self.assertEqual(content, "foobar")