예제 #1
0
    def test_base_directory_does_not_exist(self):
        """
        Test when base directory does not exist or contains incorrect name
        """

        path_to_create = "opt/"
        path_with_error = self.basedir + "/error_path"

        msg, path_created = create_directory(path_with_error, path_to_create)

        self.assertEquals(msg, _("Base path does not exist"))
예제 #2
0
파일: tests_orig.py 프로젝트: neuromat/nes
    def test_base_directory_does_not_exist(self):
        """
        Test when base directory does not exist or contains incorrect name
        """

        path_to_create = "opt/"
        path_with_error = self.basedir + "/error_path"

        msg, path_created = create_directory(path_with_error, path_to_create)

        self.assertEquals(msg, _("Base path does not exist"))
예제 #3
0
파일: tests_orig.py 프로젝트: neuromat/nes
    def test_directory_already_exists(self):
        """ Test directory creation when it already exists """

        # in this case, nothing will change
        path_to_create = "opt/"

        mkdir(path.join(self.basedir, path_to_create))

        self.assertTrue(path.exists(path.join(self.basedir, path_to_create)))

        # call function to create an already created directory
        msg, path_created = create_directory(self.basedir, path_to_create)
        self.assertEquals(msg, "")
        self.assertEquals(path_created, path.join(self.basedir, path_to_create))
예제 #4
0
    def test_directory_already_exists(self):
        """ Test directory creation when it already exists """

        # in this case, nothing will change
        path_to_create = "opt/"

        mkdir(path.join(self.basedir, path_to_create))

        self.assertTrue(path.exists(path.join(self.basedir, path_to_create)))

        # call function to create an already created directory
        msg, path_created = create_directory(self.basedir, path_to_create)
        self.assertEquals(msg, "")
        self.assertEquals(path_created, path.join(self.basedir, path_to_create))
예제 #5
0
    def test_directory_create(self):
        """ Test if directory is created correctly """
        path_to_create = "opt/"
        create_directory(self.basedir, path_to_create)

        self.assertTrue(path.exists(path.join(self.basedir, path_to_create)))
예제 #6
0
파일: tests_orig.py 프로젝트: neuromat/nes
    def test_directory_create(self):
        """ Test if directory is created correctly """
        path_to_create = "opt/"
        create_directory(self.basedir, path_to_create)

        self.assertTrue(path.exists(path.join(self.basedir, path_to_create)))