[Piglit] [PATCH 1/7] framework/tests/core_tests.py: add error message to test

baker.dylan.c at gmail.com baker.dylan.c at gmail.com
Thu Oct 8 14:49:41 PDT 2015


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

Adds a message to test_parse_listfile_tilde.

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

diff --git a/framework/tests/core_tests.py b/framework/tests/core_tests.py
index 9be9c57..82be599 100644
--- a/framework/tests/core_tests.py
+++ b/framework/tests/core_tests.py
@@ -162,11 +162,13 @@ def test_parse_listfile_tilde():
 
     """
     contents = "~/foo\n"
+    expected = os.path.expandvars("$HOME/foo")
 
     with utils.tempfile(contents) as tfile:
         results = core.parse_listfile(tfile)
 
-    nt.ok_(results[0] == os.path.expandvars("$HOME/foo"))
+    nt.eq_(results[0], expected,
+           msg='expected: {} but got: {}'.format(expected, results[0]))
 
 
 @_save_core_config
-- 
2.6.1



More information about the Piglit mailing list