Exemple #1
0
 def test_detect_body(self):
     for x in '0 1'.split():
         n = 'tmp.java.' + x
         self.assertEqual('java', Detector.detect(n))
Exemple #2
0
 def test_detect_body(self):
     for x in '0 1 2'.split():
         n = 'tmp.c.' + x
         self.assertEqual('c', Detector.detect(n))
Exemple #3
0
 def test_detect_ext(self):
     for x in 'java js'.split():
         n = 'tmp.empty.' + x
         self.assertEqual('java', Detector.detect(n))
Exemple #4
0
 def test_detect_ext(self):
     for x in self.EXT:
         n = 'tmp.empty.' + x
         self.assertEqual('c', Detector.detect(n))
Exemple #5
0
 def test_detect_body(self):
     for x in '0 1 2 3 4'.split():
         n = 'tmp.xml.' + x
         self.assertEqual('xml', Detector.detect(n))
Exemple #6
0
 def test_detect_ext(self):
     for x in ['py']:
         n = 'tmp.empty.' + x
         self.assertEqual('py', Detector.detect(n))
Exemple #7
0
 def test_detect_body(self):
     self.assertEqual('go', Detector.detect('tmp.go.0', autodetect=True))
     self.assertIsNone(Detector.detect('tmp.go.0'))
Exemple #8
0
 def test_detect_body(self):
     for x in '0 1 2'.split():
         n = 'tmp.c.' + x
         self.assertEqual('c', Detector.detect(n, autodetect=True))
         self.assertIsNone(Detector.detect(n))