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