Skip to content

Commit f915deb

Browse files
committed
debug
1 parent 72845c9 commit f915deb

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

tests/commands/test_api_error.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import platform
44
import tempfile
55
import threading
6+
import time
67
from http.server import HTTPServer, SimpleHTTPRequestHandler
78
from pathlib import Path
89
from unittest import mock
@@ -464,4 +465,10 @@ def test_all_workflow_when_server_down(self):
464465
def assert_tracking_count(self, tracking, count: int):
465466
# Prior to 3.6, `Response` object can't be obtained.
466467
if compare_version([int(x) for x in platform.python_version().split('.')], [3, 7]) >= 0:
467-
assert tracking.call_count == count
468+
attempt = 0
469+
while tracking.call_count < count:
470+
time.sleep(0.1)
471+
attempt += 1
472+
if attempt > 10:
473+
break
474+
self.assertEqual(tracking.call_count, count)

0 commit comments

Comments
 (0)