Antoine Pitrou added the comment: When relying on the timeout feature of various system APIs (e.g. waiting on a semaphore), there isn't much of an alternative to actually waiting a certain amount of time, and measuring the resulting delay. Other tests in the stdlib do this, which is indeed fragile, but better than not testing at all.
See Victor's recent issue20910, "Make sleep configurable in tests". ---------- nosy: +haypo, pitrou _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue20934> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com