def testSplitWithNoData(self): self.assertEqual(None, file_format_root.split([], 'lines', 10))
def runShallowSplitTest(self, shards, filenames): roots = file_format_root.split(filenames, 'lines', shards) self.assertTrue(len(roots) <= shards) # This low threshold is kind arbitrary based on empirical data. self.assertTrue(len(roots) >= shards/2.0)
def runShallowSplitTest(self, shards, filenames): roots = file_format_root.split(filenames, 'lines', shards) self.assertTrue(len(roots) <= shards) self.assertTrue(len(roots) >= shards*0.9)
def runShallowSplitTest(self, shards, filenames): roots = file_format_root.split(filenames, 'lines', shards) self.assertTrue(len(roots) <= shards) self.assertTrue(len(roots) >= shards * 0.9)
def runDeepSplitTest(self, shards, filenames): roots = file_format_root.split(filenames, 'zip', shards) self.assertTrue(len(roots) <= shards) # This low threshold is kind arbitrary based on empirical data. self.assertTrue(len(roots) >= shards / 2.0)
def createRoots(self, inputs, format_string, shards): return file_format_root.split(inputs, format_string, shards)