コード例 #1
0
ファイル: test_lang.py プロジェクト: phoebewang/copyright
 def test_detect_body(self):
     for x in '0 1'.split():
         n = 'tmp.java.' + x
         self.assertEqual('java', Detector.detect(n))
コード例 #2
0
ファイル: test_lang.py プロジェクト: phoebewang/copyright
 def test_detect_body(self):
     for x in '0 1 2'.split():
         n = 'tmp.c.' + x
         self.assertEqual('c', Detector.detect(n))
コード例 #3
0
ファイル: test_lang.py プロジェクト: phoebewang/copyright
 def test_detect_ext(self):
     for x in 'java js'.split():
         n = 'tmp.empty.' + x
         self.assertEqual('java', Detector.detect(n))
コード例 #4
0
ファイル: test_lang.py プロジェクト: phoebewang/copyright
 def test_detect_ext(self):
     for x in self.EXT:
         n = 'tmp.empty.' + x
         self.assertEqual('c', Detector.detect(n))
コード例 #5
0
ファイル: test_lang.py プロジェクト: phoebewang/copyright
 def test_detect_body(self):
     for x in '0 1 2 3 4'.split():
         n = 'tmp.xml.' + x
         self.assertEqual('xml', Detector.detect(n))
コード例 #6
0
ファイル: test_lang.py プロジェクト: phoebewang/copyright
 def test_detect_ext(self):
     for x in ['py']:
         n = 'tmp.empty.' + x
         self.assertEqual('py', Detector.detect(n))
コード例 #7
0
ファイル: test_lang.py プロジェクト: medarion/copyright
 def test_detect_body(self):
     self.assertEqual('go', Detector.detect('tmp.go.0', autodetect=True))
     self.assertIsNone(Detector.detect('tmp.go.0'))
コード例 #8
0
ファイル: test_lang.py プロジェクト: medarion/copyright
 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))