def run_pdb(self, script, commands):
        filename = 'main.py'
        with open(filename, 'w') as f:
            f.write(textwrap.dedent(script))
        self.addCleanup(test_support.unlink, filename)
        cmd = [sys.executable, '-m', 'pdb', filename]
        stdout = stderr = None
        proc = subprocess.Popen(cmd, stdout=subprocess.PIPE,
                                   stdin=subprocess.PIPE,
                                   stderr=subprocess.STDOUT,
                                   )
        stdout, stderr = proc.communicate(commands)
        proc.stdout.close()
        proc.stdin.close()
        return stdout, stderr
Test the _write_sheet_protection() method.
dataset/ETHPy150Open francelabs/datafari/windows/python/Lib/test/test_pdb.py/PdbTestCase.run_pdb--crossover with--dataset/ETHPy150Open jmcnamara/XlsxWriter/xlsxwriter/test/worksheet/test_write_sheet_protection.py/TestWriteSheetProtection.test_write_sheet_protection_1