Пример #1
0
 def testDoesNotExpandUserInGCSPath(self):
   logdir = 'gs://~/foo/path'
   expected = {'gs://~/foo/path': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #2
0
 def testAbsolutifies(self):
   logdir = 'lol/cat'
   expected = {os.path.realpath('lol/cat'): None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #3
0
 def testRespectsHDFSPath(self):
   logdir = 'hdfs://foo/path'
   expected = {'hdfs://foo/path': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #4
0
 def testMultipleDirectories(self):
   logdir = '/a,/b'
   expected = {'/a': None, '/b': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #5
0
 def testNormalizesPaths(self):
   logdir = '/lol/.//cat/../cat'
   expected = {'/lol/cat': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #6
0
 def testPathWithColonThatComesAfterASlash_isNotConsideredARunName(self):
   logdir = '/lol:/cat'
   expected = {'/lol:/cat': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #7
0
 def testPathWithColonThatComesAfterASlash_isNotConsideredARunName(self):
   logdir = '/lol:/cat'
   expected = {'/lol:/cat': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #8
0
 def testDoesNotNormalizeGCSPath(self):
   logdir = 'gs://foo/./path//..'
   expected = {'gs://foo/./path//..': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #9
0
 def testRunNameWithGCSPath(self):
   logdir = 'lol:gs://foo/path'
   expected = {'gs://foo/path': 'lol'}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #10
0
 def testRespectsHDFSPath(self):
   logdir = 'hdfs://foo/path'
   expected = {'hdfs://foo/path': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #11
0
 def testDoesNotExpandUserInGCSPath(self):
   logdir = 'gs://~/foo/path'
   expected = {'gs://~/foo/path': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #12
0
 def testAbsolutifies(self):
   logdir = 'lol/cat'
   expected = {os.path.realpath('lol/cat'): None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #13
0
 def testNormalizesPaths(self):
   logdir = '/lol/.//cat/../cat'
   expected = {'/lol/cat': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #14
0
 def testMultipleDirectories(self):
   logdir = '/a,/b'
   expected = {'/a': None, '/b': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #15
0
 def testDoesNotNormalizeGCSPath(self):
   logdir = 'gs://foo/./path//..'
   expected = {'gs://foo/./path//..': None}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #16
0
 def testRunName(self):
   logdir = 'lol:/cat'
   expected = {'/cat': 'lol'}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #17
0
 def testRunNameWithGCSPath(self):
   logdir = 'lol:gs://foo/path'
   expected = {'gs://foo/path': 'lol'}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)
Пример #18
0
 def testRunName(self):
   logdir = 'lol:/cat'
   expected = {'/cat': 'lol'}
   self.assertEqual(application.parse_event_files_spec(logdir), expected)