| Index: gslib/tests/test_file_part.py
|
| ===================================================================
|
| --- gslib/tests/test_file_part.py (revision 33376)
|
| +++ gslib/tests/test_file_part.py (working copy)
|
| @@ -1,3 +1,4 @@
|
| +# -*- coding: utf-8 -*-
|
| # Copyright 2013 Google Inc. All Rights Reserved.
|
| #
|
| # Licensed under the Apache License, Version 2.0 (the "License");
|
| @@ -11,14 +12,19 @@
|
| # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
| # See the License for the specific language governing permissions and
|
| # limitations under the License.
|
| +"""Unit tests for FilePart class."""
|
|
|
| -import gslib.tests.testcase as testcase
|
| +from __future__ import absolute_import
|
| +
|
| import os
|
|
|
| from gslib.file_part import FilePart
|
| +import gslib.tests.testcase as testcase
|
|
|
| +
|
| +# pylint: disable=protected-access
|
| class TestFilePart(testcase.GsUtilUnitTestCase):
|
| - """Unit tests for file_part.py"""
|
| + """Unit tests for FilePart class."""
|
|
|
| def test_tell(self):
|
| filename = 'test_tell'
|
| @@ -31,6 +37,7 @@
|
| self.assertEqual(0, fp.tell())
|
|
|
| def test_seek(self):
|
| + """Tests seeking in a FilePart."""
|
| filename = 'test_seek'
|
| contents = 100 * 'x'
|
| part_length = 23
|
| @@ -60,8 +67,9 @@
|
| self.assertEqual(part_length + 1, fp.tell())
|
|
|
| def test_read(self):
|
| + """Tests various reaad operations with FilePart."""
|
| filename = 'test_read'
|
| - contents = ""
|
| + contents = ''
|
| for i in range(1, 256):
|
| contents += str(i)
|
| part_length = 23
|
|
|