# Path: apitools/base/py/buffered_stream.py
# class BufferedStream(object):
#   def __init__(self, stream, start, size):
#   def __str__(self):
#   def __len__(self):
#   def stream_exhausted(self):
#   def stream_end_position(self):
#   def _bytes_remaining(self):
#   def read(self, size=None):  # pylint: disable=invalid-name
# 
# Path: apitools/base/py/exceptions.py
# class Error(Exception):
# class TypecheckError(Error, TypeError):
# class NotFoundError(Error):
# class UserError(Error):
# class InvalidDataError(Error):
# class CommunicationError(Error):
# class HttpError(CommunicationError):
# class InvalidUserInputError(InvalidDataError):
# class InvalidDataFromServerError(InvalidDataError, CommunicationError):
# class BatchError(Error):
# class ConfigurationError(Error):
# class GeneratedClientError(Error):
# class ConfigurationValueError(UserError):
# class ResourceUnavailableError(Error):
# class CredentialsError(Error):
# class TransferError(CommunicationError):
# class TransferRetryError(TransferError):
# class TransferInvalidError(TransferError):
# class RequestError(CommunicationError):
# class RetryAfterError(HttpError):
# class BadStatusCodeError(HttpError):
# class NotYetImplementedError(GeneratedClientError):
# class StreamExhausted(Error):
#   def __init__(self, response, content, url):
#   def __str__(self):
#   def status_code(self):
#   def FromResponse(cls, http_response):
#   def __init__(self, response, content, url, retry_after):
#   def FromResponse(cls, http_response):


import string
import StringIO
import unittest2
from apitools.base.py import buffered_stream
from apitools.base.py import exceptions
#!/usr/bin/env python
"""Tests for stream_slice."""





class BufferedStreamTest(unittest2.TestCase):

  def setUp(self):
    self.stream = StringIO.StringIO(string.letters)
    self.value = self.stream.getvalue()
    self.stream.seek(0)

  def testEmptyBuffer(self):

# Path: apitools/base/py/buffered_stream.py
# class BufferedStream(object):
#   def __init__(self, stream, start, size):
#   def __str__(self):
#   def __len__(self):
#   def stream_exhausted(self):
#   def stream_end_position(self):
#   def _bytes_remaining(self):
#   def read(self, size=None):  # pylint: disable=invalid-name
# 
# Path: apitools/base/py/exceptions.py
# class Error(Exception):
# class TypecheckError(Error, TypeError):
# class NotFoundError(Error):
# class UserError(Error):
# class InvalidDataError(Error):
# class CommunicationError(Error):
# class HttpError(CommunicationError):
# class InvalidUserInputError(InvalidDataError):
# class InvalidDataFromServerError(InvalidDataError, CommunicationError):
# class BatchError(Error):
# class ConfigurationError(Error):
# class GeneratedClientError(Error):
# class ConfigurationValueError(UserError):
# class ResourceUnavailableError(Error):
# class CredentialsError(Error):
# class TransferError(CommunicationError):
# class TransferRetryError(TransferError):
# class TransferInvalidError(TransferError):
# class RequestError(CommunicationError):
# class RetryAfterError(HttpError):
# class BadStatusCodeError(HttpError):
# class NotYetImplementedError(GeneratedClientError):
# class StreamExhausted(Error):
#   def __init__(self, response, content, url):
#   def __str__(self):
#   def status_code(self):
#   def FromResponse(cls, http_response):
#   def __init__(self, response, content, url, retry_after):
#   def FromResponse(cls, http_response):


# Path: apitools/base/py/buffered_stream_test.py
import string
import StringIO
import unittest2
from apitools.base.py import buffered_stream
from apitools.base.py import exceptions

#!/usr/bin/env python
"""Tests for stream_slice."""





class BufferedStreamTest(unittest2.TestCase):

  def setUp(self):
    self.stream = StringIO.StringIO(string.letters)
    self.value = self.stream.getvalue()
    self.stream.seek(0)

  def testEmptyBuffer(self):

    bs = buffered_stream.BufferedStream(self.stream, 0, 0)