Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(8)

Unified Diff: typ/tests/main_test.py

Issue 2693503003: Add test times to the JSON results. (Closed)
Patch Set: Created 3 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « typ/tests/json_results_test.py ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: typ/tests/main_test.py
diff --git a/typ/tests/main_test.py b/typ/tests/main_test.py
index 771e98734ae0b96e4a15252fb432a24b4d8437de..eb21ec494b17df437bc9561c32f7d6e17c8b479a 100644
--- a/typ/tests/main_test.py
+++ b/typ/tests/main_test.py
@@ -706,6 +706,14 @@ class TestCli(test_case.MainTestCase):
results = json.loads(files['results.json'])
self.assertEqual(results['interrupted'], False)
self.assertEqual(results['path_delimiter'], '.')
+
+ # The time it takes to run the test varies, so we test that
+ # we got a single entry greater than zero, but then delete it from
+ # the result so we can do an exact match on the rest of the trie.
+ result = results['tests']['pass_test']['PassingTest']['test_pass']
+ self.assertEqual(len(result['times']), 1)
+ self.assertGreater(result['times'][0], 0)
+ result.pop('times')
self.assertEqual(results['tests'],
{u'pass_test': {
u'PassingTest': {
« no previous file with comments | « typ/tests/json_results_test.py ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698