Skip to content

Commit dd09ca6

Browse files
committed
tensorflow_datasets/testing remove TODOs
1 parent 6c5f55e commit dd09ca6

File tree

5 files changed

+7
-13
lines changed

5 files changed

+7
-13
lines changed

tensorflow_datasets/testing/dataset_builder_testing.py

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -239,7 +239,7 @@ def _make_builder(self, config=None):
239239

240240
@test_utils.run_in_graph_and_eager_modes()
241241
def test_download_and_prepare_as_dataset(self):
242-
""" __TODO__ """
242+
""" Test _download_and_prepare_as_dataset """
243243
# If configs specified, ensure they are all valid
244244
if self.BUILDER_CONFIG_NAMES_TO_TEST:
245245
for config in self.BUILDER_CONFIG_NAMES_TO_TEST: # pylint: disable=not-an-iterable
@@ -264,7 +264,7 @@ def test_download_and_prepare_as_dataset(self):
264264
self._download_and_prepare_as_dataset(self.builder)
265265

266266
def _download_and_prepare_as_dataset(self, builder):
267-
""" __TODO__ """
267+
""" Download and prepare as dataset """
268268
# Provide the manual dir only if builder has MANUAL_DOWNLOAD_INSTRUCTIONS
269269
# set.
270270

@@ -313,8 +313,7 @@ def _download_and_prepare_as_dataset(self, builder):
313313
with self._sub_test("as_dataset"):
314314
self._assert_as_dataset(builder_reloaded)
315315

316-
def _assert_as_dataset(self, builder):
317-
""" __TODO__ """
316+
def _assert_as_dataset(self, builder): # pylint: disable = missing-function-docstring
318317
split_to_checksums = {} # {"split": set(examples_checksums)}
319318
for split_name, expected_examples_number in self.SPLITS.items():
320319
ds = builder.as_dataset(split=split_name)

tensorflow_datasets/testing/mocking_test.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ def test_mocking_lm1b(self):
5454
self.assertEqual(ex['text'].dtype, tf.int64)
5555
ex['text'].shape.assert_is_compatible_with((None,))
5656

57-
def test_custom_as_dataset(self):
58-
""" __TODO__ """
57+
def test_custom_as_dataset(self): # pylint: disable = missing-function-docstring
5958
def _as_dataset(self, *args, **kwargs): # pylint: disable=unused-argument
6059
return tf.data.Dataset.from_generator(
6160
lambda: ({ # pylint: disable=g-long-lambda

tensorflow_datasets/testing/test_case.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def assert_raises_with_predicate_match(self, err_type, predicate):
8080

8181
@contextlib.contextmanager
8282
def assert_logs(self, text, level="info"):
83-
""" __TODO__ """
83+
"""Log text messages with their level information"""
8484
with absltest.mock.patch.object(logging, level) as mock_log:
8585
yield
8686
concat_logs = ""

tensorflow_datasets/testing/test_utils.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,7 @@ def setUpClass(cls):
111111
cls._sub_test_stack = []
112112

113113
@contextlib.contextmanager
114-
def _sub_test(self, test_str):
115-
""" __TODO__ """
114+
def _sub_test(self, test_str): # pylint: disable = missing-function-docstring
116115
sub_test_not_implemented = True
117116
if sub_test_not_implemented:
118117
yield

tensorflow_datasets/testing/test_utils_test.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@
1414
# limitations under the License.
1515

1616
# Lint as: python3
17+
# pylint: disable = C0114, C0115, C0116
1718
"""Tests for tensorflow_datasets.core.test_utils."""
1819

1920
from __future__ import absolute_import
@@ -29,9 +30,7 @@
2930

3031

3132
class RunInGraphAndEagerTest(test_case.TestCase):
32-
""" __TODO__ """
3333
def test_run_in_graph_and_eager_modes(self):
34-
""" __TODO__ """
3534
l = []
3635
def inc(self, with_brackets):
3736
del self # self argument is required by run_in_graph_and_eager_modes.
@@ -53,12 +52,10 @@ def inc(self, with_brackets):
5352
})
5453

5554
def test_run_in_graph_and_eager_modes_setup_in_same_mode(self):
56-
""" __TODO__ """
5755
modes = []
5856
mode_name = lambda: "eager" if tf.executing_eagerly() else "graph"
5957

6058
class ExampleTest(test_case.TestCase):
61-
""" __TODO__ """
6259

6360
def run_test(self):
6461
pass

0 commit comments

Comments
 (0)