5dd2e0f6c75b15be3986986f464ee423a635c345,tensorflow_datasets/core/splits_test.py,SplitsIntegrationTest,test_split_invalid,#SplitsIntegrationTest#,258

Before Change


    with self.assertRaisesWithPredicateMatch(
        ValueError, "has already been sliced"):
      split = tfds.Split.TEST[10:] + tfds.Split.TRAIN
      split = split[:50]
      self._builder.values(split=split)

    // TODO(epot): Add tests if slice values are incorrect (not between 0-100)

After Change



    with self.assertRaisesWithPredicateMatch(ValueError, "added with itself"):
      split = (test.subsplit(tfds.percent[:10]) +
               test.subsplit(tfds.percent[10:]))
      self._builder.values(split=split)

    // Cannot slice a split twice

    with self.assertRaisesWithPredicateMatch(
        ValueError, "has already been sliced"):
      split = test.subsplit(tfds.percent[:10]).subsplit(tfds.percent[:10])
      self._builder.values(split=split)

    with self.assertRaisesWithPredicateMatch(
        ValueError, "has already been sliced"):
      split = test.subsplit(tfds.percent[10:]) + tfds.Split.TRAIN
      split = split.subsplit(tfds.percent[:50])
      self._builder.values(split=split)
Italian Trulli
In pattern: SUPERPATTERN

Frequency: 4

Non-data size: 4

Instances


Project Name: tensorflow/datasets
Commit Name: 5dd2e0f6c75b15be3986986f464ee423a635c345
Time: 2018-11-15
Author: epot@google.com
File Name: tensorflow_datasets/core/splits_test.py
Class Name: SplitsIntegrationTest
Method Name: test_split_invalid


Project Name: tensorflow/datasets
Commit Name: 5dd2e0f6c75b15be3986986f464ee423a635c345
Time: 2018-11-15
Author: epot@google.com
File Name: tensorflow_datasets/core/splits_test.py
Class Name: SplitsIntegrationTest
Method Name: test_split_invalid


Project Name: tensorflow/datasets
Commit Name: 5dd2e0f6c75b15be3986986f464ee423a635c345
Time: 2018-11-15
Author: epot@google.com
File Name: tensorflow_datasets/core/splits_test.py
Class Name: SplitsUnitTest
Method Name: test_split_equality


Project Name: tensorflow/datasets
Commit Name: 5dd2e0f6c75b15be3986986f464ee423a635c345
Time: 2018-11-15
Author: epot@google.com
File Name: tensorflow_datasets/core/splits_test.py
Class Name: SplitsIntegrationTest
Method Name: test_sub_split


Project Name: tensorflow/datasets
Commit Name: 5dd2e0f6c75b15be3986986f464ee423a635c345
Time: 2018-11-15
Author: epot@google.com
File Name: tensorflow_datasets/core/splits_test.py
Class Name: SplitsIntegrationTest
Method Name: test_sub_merge_split