Ejemplo 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)
Ejemplo 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)
Ejemplo 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)
Ejemplo 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))
Ejemplo 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)
Ejemplo 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)
Ejemplo 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))
Ejemplo 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)
Ejemplo 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)