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

Unified Diff: third_party/gsutil/gslib/test_util.py

Issue 10199002: Upgrade gsutil to 3.4 (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Addressed comments Created 8 years, 8 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/gsutil/gslib/test_thread_pool.py ('k') | third_party/gsutil/gslib/test_wildcard_iterator.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: third_party/gsutil/gslib/test_util.py
diff --git a/third_party/gsutil/20110627/gslib/test_util.py b/third_party/gsutil/gslib/test_util.py
similarity index 72%
rename from third_party/gsutil/20110627/gslib/test_util.py
rename to third_party/gsutil/gslib/test_util.py
index e77dd1fdcf7eb76f3d0b14c2fc4e89fe912072dc..7f1703baa72c43da6f5314e0679ada74fb12dd1e 100644
--- a/third_party/gsutil/20110627/gslib/test_util.py
+++ b/third_party/gsutil/gslib/test_util.py
@@ -24,6 +24,7 @@
"""Utility class for gslib unit tests"""
import sys
+import wildcard_iterator
# Put local libs at front of path so tests will run latest lib code rather
# than whatever code is found on user's PYTHONPATH.
sys.path.insert(0, '.')
@@ -31,29 +32,27 @@ sys.path.insert(0, 'boto')
import boto
from gslib.project_id import ProjectIdHandler
from tests.s3 import mock_storage_service
-import wildcard_iterator
proj_id_handler = ProjectIdHandler()
-def test_wildcard_iterator(uri_or_str,
- result_type=wildcard_iterator.ResultType.URIS,
- debug=0):
+def test_wildcard_iterator(uri_or_str, debug=0):
"""
- Convenience method for instantiating a testing
- instance of WildCardIterator, without having to specify
- all the params of that class (like
- bucket_storage_uri_class=mock_storage_service.MockBucketStorageUri).
- Also naming the factory method this way makes it clearer in the test
- code that WildcardIterator needs to be set up for testing.
+ Convenience method for instantiating a testing instance of
+ WildCardIterator, without having to specify all the params of that class
+ (like bucket_storage_uri_class=mock_storage_service.MockBucketStorageUri).
+ Also naming the factory method this way makes it clearer in the test code
+ that WildcardIterator needs to be set up for testing.
+
+ Args are same as for wildcard_iterator.wildcard_iterator(), except there's
+ no bucket_storage_uri_class arg.
- Args, Returns, and Raises are same as for
- wildcard_iterator.wildcard_iterator(), except there's no
- bucket_storage_uri_class arg.
+ Returns:
+ WildcardIterator.IterUris(), over which caller can iterate.
"""
return wildcard_iterator.wildcard_iterator(
- uri_or_str, proj_id_handler, result_type,
- mock_storage_service.MockBucketStorageUri, headers={}, debug=debug)
+ uri_or_str, proj_id_handler,
+ mock_storage_service.MockBucketStorageUri, debug=debug)
def test_storage_uri(uri_str, default_scheme='file', debug=0, validate=True):
@@ -64,9 +63,8 @@ def test_storage_uri(uri_str, default_scheme='file', debug=0, validate=True):
Also naming the factory method this way makes it clearer in the test
code that StorageUri needs to be set up for testing.
- Args, Returns, and Raises are same as for
- boto.storage_uri(), except there's no bucket_storage_uri_class arg.
+ Args, Returns, and Raises are same as for boto.storage_uri(), except there's
+ no bucket_storage_uri_class arg.
"""
-
return boto.storage_uri(uri_str, default_scheme, debug, validate,
mock_storage_service.MockBucketStorageUri)
« no previous file with comments | « third_party/gsutil/gslib/test_thread_pool.py ('k') | third_party/gsutil/gslib/test_wildcard_iterator.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698