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

Unified Diff: third_party/typ/typ/tests/main_test.py

Issue 2690743002: Roll typ v0.9.9 -> v0.9.11 (5822dda0..f6afa2bb). (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 | « third_party/typ/typ/tests/json_results_test.py ('k') | third_party/typ/typ/version.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/typ/typ/tests/main_test.py
diff --git a/third_party/typ/typ/tests/main_test.py b/third_party/typ/typ/tests/main_test.py
index 771e98734ae0b96e4a15252fb432a24b4d8437de..4474efcb19d9c21fbcd44b5a7e42eb7eff87c7e4 100644
--- a/third_party/typ/typ/tests/main_test.py
+++ b/third_party/typ/typ/tests/main_test.py
@@ -622,7 +622,7 @@ class TestCli(test_case.MainTestCase):
try:
self.check(['--test-results-server',
- '%s:%d' % server.server_address,
+ 'http://%s:%d' % server.server_address,
'--master-name', 'fake_master',
'--builder-name', 'fake_builder',
'--test-type', 'typ_tests',
@@ -636,7 +636,7 @@ class TestCli(test_case.MainTestCase):
self.assertEqual(len(posts), 1)
payload = posts[0][2].decode('utf8')
- self.assertIn('"test_pass": {"actual": "PASS", "expected": "PASS"}',
+ self.assertIn('"test_pass": {"actual": "PASS"',
payload)
self.assertTrue(payload.endswith('--\r\n'))
self.assertNotEqual(server.log.getvalue(), '')
@@ -647,7 +647,7 @@ class TestCli(test_case.MainTestCase):
try:
self.check(['--test-results-server',
- '%s:%d' % server.server_address,
+ 'http://%s:%d' % server.server_address,
'--master-name', 'fake_master',
'--builder-name', 'fake_builder',
'--test-type', 'typ_tests',
@@ -662,7 +662,7 @@ class TestCli(test_case.MainTestCase):
_ = server.stop()
def test_test_results_server_not_running(self):
- self.check(['--test-results-server', 'localhost:99999',
+ self.check(['--test-results-server', 'http://localhost:99999',
'--master-name', 'fake_master',
'--builder-name', 'fake_builder',
'--test-type', 'typ_tests',
@@ -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 | « third_party/typ/typ/tests/json_results_test.py ('k') | third_party/typ/typ/version.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698