Ejemplo n.º 1
0
    def test_AT_mkdir(self):
        """ test AT mkdir() """
        at = AT({'alias': 's'})
        # test with full path
        tmpdir = "/tmp/test1_%d" % os.getpid()
        at.mkdir(tmpdir)
        self.assertTrue(os.path.exists(tmpdir))
        os.rmdir(tmpdir)

        # test with relative path
        basedir = at.baseDir("/tmp/")
        tail = "test2_%d" % os.getpid()
        tmpdir = "/tmp/" + tail
        at.mkdir(tail)
        self.assertTrue(os.path.exists(tmpdir))
        os.rmdir(tmpdir)
Ejemplo n.º 2
0
    def test_AT_mkdir(self):
        """ test AT mkdir() """
        at = AT({'alias': 's'})
        # test with full path
        tmpdir = "/tmp/test1_%d" % os.getpid()
        at.mkdir(tmpdir)
        self.assertTrue(os.path.exists(tmpdir))
        os.rmdir(tmpdir)
 
        # test with relative path
        basedir = at.baseDir("/tmp/")
        tail = "test2_%d" % os.getpid()
        tmpdir = "/tmp/" + tail
        at.mkdir(tail)
        self.assertTrue(os.path.exists(tmpdir))
        os.rmdir(tmpdir)
Ejemplo n.º 3
0
    def test_mkdir(self):
        at = AT({'alias': 's'})
        # test with full path
        tmpdir = "/tmp/test1_%d" % os.getpid()
        at.mkdir(tmpdir)
        t1 = os.path.exists(tmpdir)

        self.assertEqual(t1, True)
        os.rmdir(tmpdir)

        # test with relative path
        basedir = at.baseDir("/tmp/")  # set base dir to /tmp/
        tail = "test2_%d" % os.getpid()
        tmpdir = "/tmp/" + tail
        at.mkdir(tail)
        t1 = os.path.exists(tmpdir)

        self.assertEqual(t1, True)
        os.rmdir(tmpdir)
Ejemplo n.º 4
0
    def test_mkdir(self):
        at = AT({'alias': 's'})
        # test with full path
        tmpdir = "/tmp/test1_%d" % os.getpid()
        at.mkdir(tmpdir)
        t1 = os.path.exists(tmpdir)
 
        self.assertEqual(t1, True)
        os.rmdir(tmpdir)
 
        # test with relative path
        basedir = at.baseDir("/tmp/")        # set base dir to /tmp/
        tail = "test2_%d" % os.getpid()
        tmpdir = "/tmp/" + tail
        at.mkdir(tail)
        t1 = os.path.exists(tmpdir)

        self.assertEqual(t1, True)
        os.rmdir(tmpdir)