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

Side by Side Diff: third_party/typ/typ/tests/runner_test.py

Issue 3017623002: Roll typ to the latest version
Patch Set: Created 3 years, 2 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 unified diff | Download patch
« no previous file with comments | « third_party/typ/typ/tests/main_test.py ('k') | third_party/typ/typ/version.py » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright 2014 Dirk Pranke. All rights reserved. 1 # Copyright 2014 Dirk Pranke. All rights reserved.
2 # 2 #
3 # Licensed under the Apache License, Version 2.0 (the "License"); 3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License. 4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at 5 # You may obtain a copy of the License at
6 # 6 #
7 # http://www.apache.org/licenses/LICENSE-2.0 7 # http://www.apache.org/licenses/LICENSE-2.0
8 # 8 #
9 # Unless required by applicable law or agreed to in writing, software 9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS, 10 # distributed under the License is distributed on an "AS IS" BASIS,
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 import unittest 93 import unittest
94 def load_tests(_, _2, _3): 94 def load_tests(_, _2, _3):
95 assert False 95 assert False
96 """)) 96 """))
97 test_set = TestSet() 97 test_set = TestSet()
98 test_set.parallel_tests = [TestInput('load_test.BaseTest.test_x')] 98 test_set.parallel_tests = [TestInput('load_test.BaseTest.test_x')]
99 r = Runner() 99 r = Runner()
100 r.args.jobs = 1 100 r.args.jobs = 1
101 ret, _, trace = r.run(test_set) 101 ret, _, trace = r.run(test_set)
102 self.assertEqual(ret, 1) 102 self.assertEqual(ret, 1)
103 self.assertIn('Failed to load "load_test.BaseTest.test_x" in ' 103 self.assertIn('BaseTest',
104 'run_one_test',
105 trace['traceEvents'][0]['args']['err']) 104 trace['traceEvents'][0]['args']['err'])
106 finally: 105 finally:
107 h.chdir(orig_wd) 106 h.chdir(orig_wd)
108 if tmpdir: 107 if tmpdir:
109 h.rmtree(tmpdir) 108 h.rmtree(tmpdir)
110 109
111 110
112 class TestWinMultiprocessing(TestCase): 111 class TestWinMultiprocessing(TestCase):
113 def make_host(self): 112 def make_host(self):
114 return Host() 113 return Host()
(...skipping 100 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 self.assertEqual('0 tests passed, 0 skipped, 0 failures.\n', out) 214 self.assertEqual('0 tests passed, 0 skipped, 0 failures.\n', out)
216 self.assertEqual(err, '') 215 self.assertEqual(err, '')
217 216
218 217
219 class ContextTests(TestCase): 218 class ContextTests(TestCase):
220 def test_context(self): 219 def test_context(self):
221 # This test is mostly intended to be called by 220 # This test is mostly intended to be called by
222 # RunnerTests.test_context, above. It is not interesting on its own. 221 # RunnerTests.test_context, above. It is not interesting on its own.
223 if self.context: 222 if self.context:
224 self.assertEquals(self.context['foo'], 'bar') 223 self.assertEquals(self.context['foo'], 'bar')
OLDNEW
« no previous file with comments | « third_party/typ/typ/tests/main_test.py ('k') | third_party/typ/typ/version.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698