def update_expected(self, backend):
        """
        Generate and write backend data.
        """
        lines = self.generate_expected(backend)
        if not os.path.isdir(self.datadir):
            print(self.datadir % 'CREATING: %s')
            os.mkdir(self.datadir)
        f = open(self.backend_filename(backend),'w+')
        try:
            print('WRITING: %s' % f.name)
            f.writelines([ s + os.linesep for s in lines])
        finally:
            f.close()
dataset/ETHPy150Open FooBarWidget/mizuho/asciidoc/tests/testasciidoc.py/AsciiDocTest.update_expected/swapped operands of `%`