コード例 #1
0
ファイル: test.py プロジェクト: ekollof/Sysalerter-frontend
def _setUp():
    testsupport.setup()
コード例 #2
0
ファイル: test_cmd.py プロジェクト: zhuyue1314/KomodoEdit
        if sys.platform.startswith("win"):
            talk = "talk.exe"
        else:
            talk = "talk"
        talkWithSpaces = os.path.join(dname, talk)
        shutil.copy(talk, talkWithSpaces)

        try:
            p = process.ProcessOpen('"%s" and here are "some" args'\
                                    % talkWithSpaces)
            output = p.stdout.read()
            self.failUnless(output.strip() == 'o0o1o2o3o4')
        finally:
            if os.path.exists(talkWithSpaces):
                os.unlink(talkWithSpaces)
            if os.path.exists(dname):
                os.removedirs(dname)


def suite():
    """Return a unittest.TestSuite to be used by test.py."""
    return unittest.makeSuite(CmdTestCase)

if __name__ == "__main__":
    import logging
    logging.basicConfig()
    testsupport.setup()
    sys.argv.insert(1, "-v") # always want verbose output
    unittest.main()

コード例 #3
0
def _setUp():
    testsupport.setup()