def convert(self, input, filename=None):
        if self.encoding and isinstance(input, str):
            input = input.decode(self.encoding)
        self._reset(input, filename)
        buf = []
        self.before_convert(buf)
        self.parse_stmts(buf, input)
        self.after_convert(buf)
        script = ''.join(buf)
        self.script = script
        return script
Test 'injectfile' with a random binary data filled file
dataset/ETHPy150Open rst2pdf/rst2pdf/rst2pdf/tenjin.py/Template.convert--crossover with--dataset/ETHPy150Open rackerlabs/openstack-guest-agents-unix/tests/test_injectfile.py/InjectFileTests.test_random_data