We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 72845c9 commit f915debCopy full SHA for f915deb
tests/commands/test_api_error.py
@@ -3,6 +3,7 @@
3
import platform
4
import tempfile
5
import threading
6
+import time
7
from http.server import HTTPServer, SimpleHTTPRequestHandler
8
from pathlib import Path
9
from unittest import mock
@@ -464,4 +465,10 @@ def test_all_workflow_when_server_down(self):
464
465
def assert_tracking_count(self, tracking, count: int):
466
# Prior to 3.6, `Response` object can't be obtained.
467
if compare_version([int(x) for x in platform.python_version().split('.')], [3, 7]) >= 0:
- 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