OLD | NEW |
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 Loading... |
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 Loading... |
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') |
OLD | NEW |