[Piglit] [PATCH 2/4] unittests: Add tests for file in tests dir not ending in .json

Dylan Baker dylan at pnwbakers.com
Thu Jun 22 22:03:06 UTC 2017


This is currently expected to fail.

Signed-off-by: Dylan Baker <dylanx.c.baker at intel.com>
---
 unittests/framework/backends/test_json.py | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/unittests/framework/backends/test_json.py b/unittests/framework/backends/test_json.py
index c9a02ffb8..a61425215 100644
--- a/unittests/framework/backends/test_json.py
+++ b/unittests/framework/backends/test_json.py
@@ -146,6 +146,17 @@ class TestJSONBackend(object):
 
             jsonschema.validate(json_, schema)
 
+        @pytest.mark.xfail
+        def test_ignores_invalid(self, tmpdir):
+            test = backends.json.JSONBackend(six.text_type(tmpdir))
+            test.initialize(shared.INITIAL_METADATA)
+            with test.write_test(self.name) as t:
+                t(self.result)
+            tmpdir.join('tests/2.json.tmp').write('{}')
+            test.finalize(
+                {'time_elapsed':
+                    results.TimeAttribute(start=0.0, end=1.0).to_json()})
+
 
 class TestUpdateResults(object):
     """Test for the _update_results function."""
-- 
2.13.1



More information about the Piglit mailing list