def test_del_on_close(self):
        # A SpooledTemporaryFile is deleted when closed
        dir = tempfile.mkdtemp()
        try:
            f = tempfile.SpooledTemporaryFile(max_size=10, dir=dir)
            self.assertFalse(f._rolled)
            f.write(b'blat ' * 5)
            self.assertTrue(f._rolled)
            filename = f.name
            f.close()
            self.assertFalse(isinstance(filename, str) and os.path.exists(filename),
                        filename % "SpooledTemporaryFile %s exists after close")
        finally:
            os.rmdir(dir)
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_tempfile.py/TestSpooledTemporaryFile.test_del_on_close/swapped operands of `%`