Ejemplo n.º 1
0
 def test_detectMulAbsInModule_NegativeCase(self):
     fileName = "/Users/Tushar/Documents/Research/PuppetQuality/Repos/cmits/cmits-example/modules-unclass/automount/manifests/subdir.pp"
     testFile = "tmp/multifacetedAbsForm2ModuleTest.txt"
     fileObj = SourceModel.SM_File.SM_File(fileName)
     outFile = open(testFile, 'w')
     AbsSmellDectector.detectMulAbsInModule(fileObj, outFile)
     outFile.close()
     outFileRead = open(testFile, 'r')
     self.assertEquals(len(outFileRead.read()), 0)
Ejemplo n.º 2
0
 def test_detectMulAbsInModule_PositiveCase(self):
     fileName = "/Users/Tushar/Documents/Research/PuppetQuality/Repos/operations-puppet-production/manifests/role/authdns.pp"
     testFile = "tmp/multifacetedAbsForm2ModuleTest.txt"
     fileObj = SourceModel.SM_File.SM_File(fileName)
     outFile = open(testFile, 'w')
     AbsSmellDectector.detectMulAbsInModule(fileObj, outFile)
     outFile.close()
     outFileRead = open(testFile, 'r')
     self.assertGreater(len(outFileRead.read()), 0)