| OLD | NEW |
| 1 #!/usr/bin/python | 1 #!/usr/bin/python |
| 2 | 2 |
| 3 """Copyright 2012 the Dart project authors. All rights reserved. | 3 """Copyright 2012 the Dart project authors. All rights reserved. |
| 4 | 4 |
| 5 Python file to test gsutil.py. | 5 Python file to test gsutil.py. |
| 6 """ | 6 """ |
| 7 import os | 7 import os |
| 8 import platform | 8 import platform |
| 9 import shutil | 9 import shutil |
| 10 import tempfile | 10 import tempfile |
| 11 import unittest | 11 import unittest |
| 12 import gsutil | 12 import gsutil |
| 13 | 13 |
| 14 # access to protected members of gsutil.py |
| 15 # pylint: disable=W0212 |
| 14 | 16 |
| 15 class TestGsutil(unittest.TestCase): | 17 class TestGsutil(unittest.TestCase): |
| 16 """Class to test the gsutil.py class.""" | 18 """Class to test the gsutil.py class.""" |
| 17 test_prefix = 'gs://' | 19 test_prefix = 'gs://' |
| 18 test_bucket = 'dart-editor-archive-testing' | 20 test_bucket = 'dart-editor-archive-testing' |
| 19 test_folder = 'unit-testing' | 21 test_folder = 'unit-testing' |
| 20 build_count = 3 | 22 build_count = 3 |
| 21 | 23 |
| 22 def setUp(self): | 24 def setUp(self): |
| 23 """Setup the test.""" | 25 """Setup the test.""" |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 250 file_uri = upload_file.name | 252 file_uri = upload_file.name |
| 251 full_gs_uri = '{0}/{1}'.format(object_uri, | 253 full_gs_uri = '{0}/{1}'.format(object_uri, |
| 252 os.path.basename(upload_file.name)) | 254 os.path.basename(upload_file.name)) |
| 253 self._gsu.Copy(file_uri, full_gs_uri, False) | 255 self._gsu.Copy(file_uri, full_gs_uri, False) |
| 254 finally: | 256 finally: |
| 255 os.remove(upload_file.name) | 257 os.remove(upload_file.name) |
| 256 | 258 |
| 257 if __name__ == '__main__': | 259 if __name__ == '__main__': |
| 258 unittest.main() | 260 unittest.main() |
| 259 | 261 |
| OLD | NEW |