Beispiel #1
0
def _setUp():
    testsupport.setup()
Beispiel #2
0
        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()

Beispiel #3
0
def _setUp():
    testsupport.setup()