def setUp(self): self.dire = os.path.dirname(__file__) self.signfile = os.path.join(self.dire, 'testData/dummySign.py') self.unsigned = os.path.join(self.dire, 'testData/test_unsignedfile.py') helper.newFile(self.unsigned) helper.testArea(self) helper.readrc(self)
def setUp(self): self.dire = os.path.dirname(__file__) self.signedfile = os.path.join(self.dire, 'testData/toBeSigned.py') self.signed = os.path.join(self.dire, 'testData/test_signedfile.py') shutil.copyfile(self.signedfile, self.signed) self.unsigned = os.path.join(self.dire, 'testData/test_unsignedfile.py') helper.newFile(self.unsigned) helper.readrc(self)
def setUp(self): self.dire = os.path.dirname(__file__) self.signfile = os.path.join(self.dire, 'testData/dummySign.py') self.otherSignfile = os.path.join(self.dire, 'testData/otherSign.py') self.shortSign = os.path.join(self.dire, 'testData/shortSign.py') self.longSign = os.path.join(self.dire, 'testData/longSign.py') self.toBeSigned = os.path.join(self.dire, 'testData/toBeSigned.py') self.signed = os.path.join(self.dire, 'testData/test_signedfile.py') shutil.copyfile(self.toBeSigned, self.signed) self.unsigned = os.path.join(self.dire, 'testData/test_unsignedfile.py') helper.newFile(self.unsigned) helper.readrc(self)
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)
def test_removeInter_not_hasInter(self): simplefile = os.path.join(self.dire, 'test_simplefile') helper.newFile(simplefile) self.assertEqual(removeInter(simplefile, self.options_py.allow), None) os.remove(simplefile)