def test_save_exception_state_on_error(self):
        # See issue #14474
        def task():
            started.release()
            raise SyntaxError
        def mywrite(self, *args):
            try:
                raise ValueError
            except ValueError:
                pass
            real_write(self, *args)
        c = thread._count()
        started = thread.allocate_lock()
        with support.captured_output("stderr") as stderr:
            real_write = stderr.write
            stderr.write = mywrite
            started.acquire()
            thread.start_new_thread(task, ())
            started.acquire()
            while c > thread._count():
                time.sleep(0.01)
        self.assertIn("Traceback", stderr.getvalue())
dataset/ETHPy150Open amrdraz/kodr/app/brython/www/src/Lib/test/test_thread.py/ThreadRunningTests.test_save_exception_state_on_error/swapped operands of `>`