OLD | NEW |
1 #!/usr/bin/env python | 1 #!/usr/bin/env python |
2 # Copyright 2015 The LUCI Authors. All rights reserved. | 2 # Copyright 2015 The LUCI Authors. All rights reserved. |
3 # Use of this source code is governed under the Apache License, Version 2.0 | 3 # Use of this source code is governed under the Apache License, Version 2.0 |
4 # that can be found in the LICENSE file. | 4 # that can be found in the LICENSE file. |
5 | 5 |
6 import copy | 6 import copy |
7 import doctest | 7 import doctest |
8 import os | 8 import os |
9 import subprocess | 9 import subprocess |
10 import unittest | 10 import unittest |
(...skipping 366 matching lines...) Loading... |
377 | 377 |
378 | 378 |
379 class TestPackageSpec(MockIOThings, unittest.TestCase): | 379 class TestPackageSpec(MockIOThings, unittest.TestCase): |
380 def setUp(self): | 380 def setUp(self): |
381 super(TestPackageSpec, self).setUp() | 381 super(TestPackageSpec, self).setUp() |
382 | 382 |
383 self.proto_text = """ | 383 self.proto_text = """ |
384 api_version: 1 | 384 api_version: 1 |
385 project_id: "super_main_package" | 385 project_id: "super_main_package" |
386 recipes_path: "path/to/recipes" | 386 recipes_path: "path/to/recipes" |
387 canonical_base_url: "https://bobbie.example.com" | |
388 deps { | 387 deps { |
389 project_id: "bar" | 388 project_id: "bar" |
390 url: "https://repo.com/bar.git" | 389 url: "https://repo.com/bar.git" |
391 branch: "superbar" | 390 branch: "superbar" |
392 revision: "deadd00d" | 391 revision: "deadd00d" |
393 } | 392 } |
394 deps { | 393 deps { |
395 project_id: "foo" | 394 project_id: "foo" |
396 url: "https://repo.com/foo.git" | 395 url: "https://repo.com/foo.git" |
397 branch: "master" | 396 branch: "master" |
(...skipping 73 matching lines...) Loading... |
471 self.assertFalse(checkout.called) | 470 self.assertFalse(checkout.called) |
472 | 471 |
473 | 472 |
474 def load_tests(_loader, tests, _ignore): | 473 def load_tests(_loader, tests, _ignore): |
475 tests.addTests(doctest.DocTestSuite(package)) | 474 tests.addTests(doctest.DocTestSuite(package)) |
476 return tests | 475 return tests |
477 | 476 |
478 | 477 |
479 if __name__ == '__main__': | 478 if __name__ == '__main__': |
480 result = unittest.main() | 479 result = unittest.main() |
OLD | NEW |