तिथि को रक्षित करें! Google I / O 18-20 मई को पंजीकृत करता है

Module: tfds.testing

Testing utilities.


class DatasetBuilderTestCase: Inherit this class to test your DatasetBuilder class.

class DummyDataset: Minimal DatasetBuilder.

class DummyDatasetSharedGenerator: Test DatasetBuilder.

class DummyMnist: Test DatasetBuilder.

class FeatureExpectationItem: Test item of a FeatureExpectation.

class FeatureExpectationsTestCase: Tests FeatureExpectations with full encode-decode.

class MockFs: This util wraps mock for the tf.io.gfile API.

class MockPolicy: Strategy to use with tfds.testing.mock_data to mock the dataset.

class RaggedConstant: Container of tf.ragged.constant values.

class SubTestCase: Adds subTest() context manager to the TestCase if supported.

class TestCase: Base TestCase to be used for all tests.



make_tmp_dir(...): Make a temporary directory.

mock_data(...): Mock tfds to generate random data.

mock_kaggle_api(...): Mock out the kaggle CLI.

rm_tmp_dir(...): Rm temporary directory.

run_in_graph_and_eager_modes(...): Execute the decorated test in both graph mode and eager mode.

test_main(...): Entrypoint for tests.

tmp_dir(...): Context manager for a temporary directory.