[Piglit] [PATCH 8/9] tests/oglconform.py: simplify writing to /dev/null

baker.dylan.c at gmail.com baker.dylan.c at gmail.com
Wed Oct 21 11:06:33 PDT 2015


From: Dylan Baker <baker.dylan.c at gmail.com>

I'm a little surprised this actually works, since it's currently
pointing to an int, rather than a file-like object.

This patch simplifies the code by pointing at the open file-like object.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 tests/oglconform.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/oglconform.py b/tests/oglconform.py
index c0ac4a3..38d9141 100644
--- a/tests/oglconform.py
+++ b/tests/oglconform.py
@@ -71,9 +71,9 @@ def _make_profile():
     profile_ = TestProfile()
 
     with tempfile.NamedTemporaryFile() as f:
-        with open(os.devnull, "w") as devnull:
+        with open(os.devnull, "w") as d:
             subprocess.call([BIN, '-generateTestList', f.name],
-                            stdout=devnull.fileno(), stderr=devnull.fileno())
+                            stdout=d, stderr=d)
 
         f.seek(0)
 
-- 
2.6.1



More information about the Piglit mailing list