summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--framework/tests/json_results_update_tests.py21
1 files changed, 12 insertions, 9 deletions
diff --git a/framework/tests/json_results_update_tests.py b/framework/tests/json_results_update_tests.py
index 9ae1102a4..f89d65f42 100644
--- a/framework/tests/json_results_update_tests.py
+++ b/framework/tests/json_results_update_tests.py
@@ -278,6 +278,18 @@ class TestV0toV1(object):
with open(t, 'r') as f:
backends.json._update_zero_to_one(backends.json._load(f))
+ @utils.DocFormatter({'current': backends.json.CURRENT_JSON_VERSION})
+ def test_load_results(self):
+ """backends.json.update_results (1 -> {current}): load_results properly updates"""
+ with utils.tempdir() as d:
+ tempfile = os.path.join(d, 'results.json')
+ with open(tempfile, 'w') as f:
+ json.dump(self.DATA, f, default=backends.json.piglit_encoder)
+ with open(tempfile, 'r') as f:
+ result = backends.json.load_results(tempfile, 'none')
+ nt.eq_(result.results_version,
+ backends.json.CURRENT_JSON_VERSION)
+
class TestV2Update(object):
"""Test V1 to V2 of results."""
@@ -740,12 +752,3 @@ class TestV6toV7(object):
"""backends.json.update_results (6 -> 7): Totals are populated"""
nt.ok_(self.result.totals != {})
- def test_load_results(self):
- """backends.json.update_results (6 -> 7): load_results properly updates."""
- with utils.tempdir() as d:
- tempfile = os.path.join(d, 'results.json')
- with open(tempfile, 'w') as f:
- json.dump(self.DATA, f, default=backends.json.piglit_encoder)
- with open(tempfile, 'r') as f:
- result = backends.json.load_results(tempfile, 'none')
- nt.eq_(result.results_version, 7)