Instead of explicitly enumerate test classes for run_unittest()
use the unittest ability to discover tests. This also makes these
tests discoverable and runnable with unittest.
load_tests() can be used for dynamic generating tests and adding
doctests. setUpModule(), tearDownModule() and addModuleCleanup()
can be used for running code before and after all module tests.
* Move socket related functions from test.support to socket_helper.
* Import socket, nntplib and urllib.error lazily in transient_internet().
* Remove importing multiprocess.
* bpo-31479: Always reset the signal alarm in tests
Use "try: ... finally: signal.signal(0)" pattern to make sure that
tests don't "leak" a pending fatal signal alarm.
* Move two more alarm() calls into the try block
Fix also typo: replace signal.signal(0) with signal.alarm(0)
* Move another signal.alarm() into the try block
* #30014: make selectors.DefaultSelector.modify() faster by relying on selector's modify() method instead of un/register()ing the fd
* #30014: add unit test
* speedup poll/epoll/devpoll modify() method by using internal modify() call
* update doc
* address PR comments
* update NEWS entries
* use != instead of 'is not'
Selector.select() is now retried with the recomputed timeout when interrupted
by a signal.
Write an unit test with a signal handler raising an exception, and a unit with
a signal handler which does not raise an exception (it does nothing).
RuntimeError if the selector is closed. And selectors.BaseSelector.close() now
clears its internal reference to the selector mapping to break a reference
cycle. Initial patch written by Martin Richard.
threading.Lock.acquire(), threading.RLock.acquire() and socket operations now
use a monotonic clock, instead of the system clock, when a timeout is used.
zero, instead of rounding towards zero. For example, a timeout of one
microsecond is now rounded to one millisecond, instead of being rounded to
zero.
Move also a test in test_epoll which was moved by my previous merge.
the unit test on max time (but be more strict on mon time). Example of failure:
http://buildbot.python.org/all/builders/x86%20OpenIndiana%203.x/builds/6978/steps/test/logs/stdio
======================================================================
FAIL: test_timeout (test.test_selectors.PollSelectorTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/export/home/buildbot/32bits/3.x.cea-indiana-x86/build/Lib/test/test_selectors.py", line 316, in test_timeout
self.assertTrue(0.5 < t1 - t0 < 1.5, t1 - t0)
AssertionError: False is not true : 1.5033390671014786