예제 #1
0
def test_pkg(package):
    """Test running the package
    """
    mkdir('dist/test', parent=True)
    unpack(package, 'dist/test/')
    dirname = basename( ".".join(package.split(".")[:-2]))
    sh('emacs -Q -l dist/test/'+dirname+'/epy-init.el')
예제 #2
0
    def test_cp_f_d(self):
        """Copy a file to a directory.

        """
        src = self.src
        try:
            cp(src, "/tmp")
            assert (os.path.exists(os.path.join("/tmp", basename(src))))
        finally:
            rm_silent("/tmp/test.txt")
예제 #3
0
 def test_file(self):
     name = "/hello/baby"
     self.assertEqual(basename(name),"baby")
예제 #4
0
 def test_dir(self):
     """
     """
     name = "/hello/world/"
     self.assertEqual(basename(name), "world")