Esempio n. 1
0
 def test_checkType_python_file_no_ext(self):
     pythonfile = os.path.join(self.dire, 'test_pythonfile')
     stored = os.path.join(self.dire, 'testData/pythonfile')
     shutil.copyfile(stored, pythonfile)
     ext = self.options_py.ext
     self.assertFalse(checkType(pythonfile, ext))
     os.remove(pythonfile)
Esempio n. 2
0
 def test_checkType_python_file_no_ext(self):
     pythonfile = os.path.join(self.dire, 'test_pythonfile')
     stored = os.path.join(self.dire, 'testData/pythonfile')
     shutil.copyfile(stored, pythonfile)
     ext = self.options_py.ext
     self.assertFalse(checkType(pythonfile, ext))
     os.remove(pythonfile)
Esempio n. 3
0
 def test_removeInter_hasInter(self):
     pythonfile = os.path.join(self.dire, 'test_pythonfile.py')
     stored = os.path.join(self.dire, 'testData/pythonfile')
     shutil.copyfile(stored, pythonfile)
     ext = self.options_py.ext
     self.assertTrue(checkType(pythonfile, ext))
     self.assertNotEqual(removeInter(pythonfile, self.options_py.allow), None)
     os.remove(pythonfile)
Esempio n. 4
0
 def test_checkType_c_file(self):
     path = os.path.join(self.dire, 'testData/signed/c')
     ext = self.options_c.ext
     for filename in os.listdir(path):
         self.assertTrue(checkType(filename, ext))
Esempio n. 5
0
 def test_checkType_python_file(self):
     pythonfile = os.path.join(self.dire, 'test_pythonfile.py')
     helper.newFile(pythonfile)
     ext = self.options_py.ext
     self.assertTrue(checkType(pythonfile, ext))
     os.remove(pythonfile)
Esempio n. 6
0
 def test_checkType_not_python_file(self):
     simplefile = os.path.join(self.dire, 'test_simplefile')
     helper.newFile(simplefile)
     ext = self.options_py.ext
     self.assertFalse(checkType(simplefile, ext))
     os.remove(simplefile)
Esempio n. 7
0
 def test_checkType_c_file(self):
     path = os.path.join(self.dire, 'testData/signed/c')
     ext = self.options_c.ext
     for filename in os.listdir(path):
         self.assertTrue(checkType(filename, ext))
Esempio n. 8
0
 def test_checkType_python_file(self):
     pythonfile = os.path.join(self.dire, 'test_pythonfile.py')
     helper.newFile(pythonfile)
     ext = self.options_py.ext
     self.assertTrue(checkType(pythonfile, ext))
     os.remove(pythonfile)
Esempio n. 9
0
 def test_checkType_not_python_file(self):
     simplefile = os.path.join(self.dire, 'test_simplefile')
     helper.newFile(simplefile)
     ext = self.options_py.ext
     self.assertFalse(checkType(simplefile, ext))
     os.remove(simplefile)