def testInvalidRecursiveDirectoryWildcard(self):
    try:
      uri = self._test_storage_uri(suri(self.test_dir, '***', 'abcd'))
      for unused_ in self._test_wildcard_iterator(uri).IterAll(
          expand_top_level_buckets=True):
        self.fail('Expected WildcardException not raised.')
    except wildcard_iterator.WildcardException, e:
      # Expected behavior.
      self.assertTrue(str(e).find('more than 2 consecutive') != -1)
Tests that wildcard containing '***' raises exception.
dataset/ETHPy150Open GoogleCloudPlatform/gsutil/gslib/tests/test_wildcard_iterator.py/FileIteratorTests.testInvalidRecursiveDirectoryWildcard