def testSplitWithNoData(self):
   self.assertEqual(None, file_format_root.split([], 'lines', 10))
Ejemplo n.º 2
0
 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)
Ejemplo n.º 4
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)
Ejemplo n.º 5
0
 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)
Ejemplo n.º 6
0
 def testSplitWithNoData(self):
     self.assertEqual(None, file_format_root.split([], 'lines', 10))
 def createRoots(self, inputs, format_string, shards):
   return file_format_root.split(inputs, format_string, shards)