Esempio n. 1
0
            self.assertEquals(groups[0]["ccompiler"], "gcc", "readGroups() has wrong information")
            self.assertEquals(groups[0]["cflags"], "-O0", "readGroups() has wrong information")
            self.assertEquals(groups[0].defines["testvariable"], "foo", "readGroups() has wrong information")
        finally:
            utilityFunctions.removeDir(tempDir)

    def test_readGroups13(self):
        fileContents = textwrap.dedent("""
                                       wrongParens, *, * (
                                           ccompiler = gcc
                                           cflags = -O0
                                           testVariable = foo
                                        )
                                       """)
        try:
            tempDir = mdTestUtilities.makeTempDir()
            filePath = mdTestUtilities.makeTempFile(tempDir, fileContents)
            groups = overrides.readGroups(filePath)
            self.assertEquals(groups, None, "readGroups() should have failed to read groups")
        finally:
            utilityFunctions.removeDir(tempDir)

def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(Test_overrides))
    return suite

if __name__ == "__main__":
    logger.setLogger("Console")
    unittest.main()
Esempio n. 2
0
        finally:
            utilityFunctions.removeDir(tempDir)

    def test_readGroups13(self):
        fileContents = textwrap.dedent("""
                                       wrongParens, *, * (
                                           ccompiler = gcc
                                           cflags = -O0
                                           testVariable = foo
                                        )
                                       """)
        try:
            tempDir = mdTestUtilities.makeTempDir()
            filePath = mdTestUtilities.makeTempFile(tempDir, fileContents)
            groups = overrides.readGroups(filePath)
            self.assertEquals(
                groups, None, "readGroups() should have failed to read groups")
        finally:
            utilityFunctions.removeDir(tempDir)


def suite():
    suite = unittest.TestSuite()
    suite.addTest(unittest.makeSuite(Test_overrides))
    return suite


if __name__ == "__main__":
    logger.setLogger("Console")
    unittest.main()