bpo-28395: Remove unnecessary semicolons in tests (GH-26868)

(cherry picked from commit 5a3108044d2e5b694da2d1f4176c9bbaef15c142)

Co-authored-by: Dong-hee Na <donghee.na@python.org>
diff --git a/Lib/test/test_capi.py b/Lib/test/test_capi.py
index 1b18bfa..f9c5aca 100644
--- a/Lib/test/test_capi.py
+++ b/Lib/test/test_capi.py
@@ -635,11 +635,11 @@ def callback():
             #unsuccessful.
             while True:
                 if _testcapi._pending_threadfunc(callback):
-                    break;
+                    break
 
     def pendingcalls_wait(self, l, n, context = None):
         #now, stick around until l[0] has grown to 10
-        count = 0;
+        count = 0
         while len(l) != n:
             #this busy loop is where we expect to be interrupted to
             #run our callbacks.  Note that callbacks are only run on the