Exemple #1
0
    def write_fd(self, out_file):
        '''Write record entry to filesystem.'''
        if self.content_raw is not None:
            out_file.write(self.tag_raw)
            out_file.write(join_ate(u"\n", self.content_raw))
        else:
            out_file.write(self.get_tag())
            out_file.write(": ")
            out_file.write(self.get_content())
            out_file.write("\n")

        if self.comment_raw is not None:
            out_file.write(join_ate(u"\n", self.comment_raw))
        else:
            out_file.write("# ")
            out_file.write(self.get_comment())
            out_file.write("\n")
Exemple #2
0
    def write_fd(self, out_file):
        '''Write record entry to filesystem.'''
        if self.content_raw is not None:
            out_file.write(self.tag_raw)
            out_file.write(join_ate(u"\n", self.content_raw))
        else:
            out_file.write(self.get_tag())
            out_file.write(": ")
            out_file.write(self.get_content())
            out_file.write("\n")

        if self.comment_raw is not None:
            out_file.write(join_ate(u"\n", self.comment_raw))
        else:
            out_file.write("# ")
            out_file.write(self.get_comment())
            out_file.write("\n")
    def rmttest_pos_02(self):
        "StringHelper.join_ate empty list"

        join_res = join_ate("-", [])
        self.assertEqual("", join_res)
    def rmttest_pos_01(self):
        "StringHelper.join_ate with elements"

        join_res = join_ate("-", ["a", "b", "c", "d"])
        self.assertEqual("a-b-c-d-", join_res)
Exemple #5
0
    def rmttest_pos_02(self):
        "StringHelper.join_ate empty list"

        join_res = join_ate("-", [])
        assert "" == join_res
    def rmttest_pos_02(self):
        "StringHelper.join_ate empty list"

        join_res = join_ate("-", [])
        assert "" == join_res
    def rmttest_pos_01(self):
        "StringHelper.join_ate with elements"

        join_res = join_ate("-", ["a", "b", "c", "d"])
        assert "a-b-c-d-" == join_res