076f53b2b8159bcabb04a83860916637aa60cb86,tensorflow_datasets/core/splits_test.py,SplitsDictTest,test_bool,#SplitsDictTest#,75
Before Change
def test_bool(self):
sd = splits.SplitDict("ds_name")
self.assertFalse(sd) // Empty split is False
sd.add(tfds.core.SplitInfo(name="train", shard_lengths=[5], num_bytes=0))
self.assertTrue(sd) // Non-empty split is True
def test_check_splits_equals(self):
s1 = splits.SplitDict("ds_name")
After Change
def test_bool(self):
sd = splits.SplitDict([], dataset_name="ds_name")
self.assertFalse(sd) // Empty split is False
si = [tfds.core.SplitInfo(name="train", shard_lengths=[5], num_bytes=0)]
sd = splits.SplitDict(si, dataset_name="ds_name")
self.assertTrue(sd) // Non-empty split is True
In pattern: SUPERPATTERN
Frequency: 3
Non-data size: 4
Instances
Project Name: tensorflow/datasets
Commit Name: 076f53b2b8159bcabb04a83860916637aa60cb86
Time: 2020-12-01
Author: epot@google.com
File Name: tensorflow_datasets/core/splits_test.py
Class Name: SplitsDictTest
Method Name: test_bool
Project Name: tensorflow/datasets
Commit Name: 076f53b2b8159bcabb04a83860916637aa60cb86
Time: 2020-12-01
Author: epot@google.com
File Name: tensorflow_datasets/core/splits_test.py
Class Name: SplitDictTest
Method Name: test_num_shards
Project Name: tensorflow/datasets
Commit Name: 076f53b2b8159bcabb04a83860916637aa60cb86
Time: 2020-12-01
Author: epot@google.com
File Name: tensorflow_datasets/core/splits_test.py
Class Name: SplitsDictTest
Method Name: split_dict