Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bpo-24412: Adds cleanUps for setUpClass and setUpModule. #9190

Merged
merged 7 commits into from Nov 9, 2018

Conversation

lisroach
Copy link
Contributor

@lisroach lisroach commented Sep 11, 2018

https://bugs.python.org/issue24412

This issue is rather old so it could benefit from a refreshed discussion.

I think having the cleanUps be available for all of the setUp types makes sense, it keeps code cleaner by reducing try-catches and keeps the API consistent across all the setUps.

https://bugs.python.org/issue24412

Copy link
Member

@warsaw warsaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for this PR! I've wanted this for a long time, and really appreciate you working on it. I have a few questions and comments inlined.

Lib/unittest/case.py Show resolved Hide resolved
tearDownModule."""
while _module_cleanups:
function, args, kwargs = _module_cleanups.pop()
function(*args, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What happens if an exception occurs in function? Currently that will prevent other module cleanups from being called. Without looking at what's done for other cleanup functions, I think it might be better to catch the exception and continue processing, but OTOH consistency in behavior with other cleanups is best.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes you're right, this doesn't work quite right here. The normal tearDown() neatly handles the exceptions so that all the cleanups will be called. I'll look into doing that here an in the class tearDown as well. Thanks for catching this!

@@ -390,6 +404,8 @@ class TestCase(object):

_classSetupFailed = False

_class_cleanups = []
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Minor nit (maybe!): In this case, the blank line between these two class attributes may not be needed.

@@ -445,6 +461,12 @@ def addCleanup(self, function, *args, **kwargs):
Cleanup items are called even if setUp fails (unlike tearDown)."""
self._cleanups.append((function, args, kwargs))

@classmethod
def addClassCleanup(cls, function, *args, **kwargs):
"""Same as addCleanup, excet the cleanup items are called even if
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

s/excet/except/

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

tearDownClass."""
while cls._class_cleanups:
function, args, kwargs = cls._class_cleanups.pop()
function(*args, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Same question as above with exceptions in function.

Lib/unittest/test/test_runner.py Show resolved Hide resolved
@bedevere-bot
Copy link

A Python core developer has requested some changes be made to your pull request before we can consider merging it. If you could please address their requests along with any other requests in other reviews from core developers that would be appreciated.

Once you have made the requested changes, please leave a comment on this pull request containing the phrase I have made the requested changes; please review again. I will then notify any core developers who have left a review that you're ready for them to take another look at this pull request.

@lisroach
Copy link
Contributor Author

I have made the requested changes; please review again.

Thanks for the feedback Barry! Hopefully I haven't missed any edge cases, I think I have covered the possible exception scenarios now.

@bedevere-bot
Copy link

Thanks for making the requested changes!

@warsaw: please review the changes made to this pull request.

except Exception as exc:
exceptions.append(exc)
if exceptions:
raise exceptions[0]
Copy link
Member

@warsaw warsaw Sep 14, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I totally get why you have to do it this way, although it would be nice if we had trio's MultiError in the stdlib. :) It's unfortunate that we have to throw away all the other exceptions, but I don't know where you can stash them. E.g. IIUC, instance cleanups stash the exceptions on self.errors, but there's no such place on modules (unless this code adds it, which, yuck :)). The other alternative is to create something like a simple MultiError, add the exceptions to that, and then raise the MultiError (maybe only if len(exceptions) > 1?).

It seems like a lot of extra complication for hopefully an, um, exceptional case, so maybe punt on that for now. IOW, I'm cool with this, unless you have any other ideas.

except Exception as exc:
exceptions.append(exc)
if exceptions:
raise exceptions[0]
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In this case exceptions could be stashed on cls so they don't get lost.

finally:
_call_if_exists(result, '_restoreStdout')

def _createClassOrModuleLevelException(self, result, exc, parent, name):
errorName = '{} ({})'.format(parent, name)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is Python 3.8, so what do you think about using f{parent} ({name})?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Definitely! I wasn't sure how important maintaining the current style in the code is, I didn't want to jump the gun and make it 3.8 only if normally we try to keep the code more backwards compatible. I will move it to the f-string style :)

Copy link
Member

@warsaw warsaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have just a few more comments, but this is looking great, so I'll approve it. If you have any thoughts on how to save the list of module exceptions, then I think that would be good to implement, but if not, then I think this branch looks great. Thanks!

@warsaw
Copy link
Member

warsaw commented Sep 14, 2018

But,oops, Travis is failing ;)

@taleinat
Copy link
Contributor

But,oops, Travis is failing ;)

That appears to have been a transient error; I restarted the build and it succeeded.

@lisroach
Copy link
Contributor Author

Thanks Tal! I plan to finish this up tonight, looking into if I can improve the exception handling.

@taleinat
Copy link
Contributor

taleinat commented Sep 26, 2018

I'm looking forward to it! IMO we should definitely have this available in 3.8.

Copy link
Member

@serhiy-storchaka serhiy-storchaka left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a What's New entry.

@@ -1448,6 +1448,66 @@ Test cases

.. versionadded:: 3.1

.. method:: addClassCleanup(function, *args, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

classmethod

.. versionadded:: 3.8


.. method:: doClassCleanups()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

classmethod


.. versionadded:: 3.8

.. method:: addModuleCleanup(function, *args, **kwargs)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not a method of TestCase.

.. versionadded:: 3.8


.. method:: doModuleCleanups()
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It is not a method of TestCase.

finally:
_call_if_exists(result, '_restoreStdout')

def _createClassOrModuleLevelException(self, result, exc, parent, name):
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't names parent and name be swapped or changed to more meaning names? The third argument is the method name and the forth argument is the module or class name.

@@ -0,0 +1,2 @@
Add ``addModuleCleanup()`` and ``addClassCleanup()`` to unittest to support
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be worth to add references: :meth:`~unittest.TestCase.addModuleCleanup()`, :func:`~unittest.addModuleCleanup()`, :meth:`~unittest.TestCase.setUpClass()`, :func:`~unittest.setUpModule()`.

@lisroach lisroach merged commit 0f221d0 into python:master Nov 9, 2018
@bedevere-bot
Copy link

⚠️⚠️⚠️ Buildbot failure ⚠️⚠️⚠️

Hi! The buildbot AMD64 FreeBSD 10-STABLE Non-Debug 3.x has failed when building commit 0f221d0.

What do you need to do:

  1. Don't panic.
  2. Check the buildbot page in the devguide if you don't know what the buildbots are or how they work.
  3. Go to the page of the buildbot that failed (https://buildbot.python.org/all/#builders/167/builds/175) and take a look at the build logs.
  4. Check if the failure is related to this commit (0f221d0) or if it is a false positive.
  5. If the failure is related to this commit, please, reflect that on the issue and make a new Pull Request with a fix.

You can take a look at the buildbot page here:

https://buildbot.python.org/all/#builders/167/builds/175

Click to see traceback logs
From https://github.com/python/cpython
 * branch                  master     -> FETCH_HEAD
Reset branch 'master'

test_smtpnet skipped -- No module named '_ssl'
test_idle skipped -- No module named '_tkinter'
test_tix skipped -- No module named '_tkinter'
test_zipfile64 skipped -- test requires loads of disk-space bytes and a long time to run
test_winconsoleio skipped -- test only relevant on win32
test__all__ (test.test_multiprocessing_forkserver.MiscTestCase) ... ok
test_answer_challenge_auth_failure (test.test_multiprocessing_forkserver.OtherTest) ... ok
test_deliver_challenge_auth_failure (test.test_multiprocessing_forkserver.OtherTest) ... ok
test_closefd (test.test_multiprocessing_forkserver.TestCloseFds) ... ok
test_flags (test.test_multiprocessing_forkserver.TestFlags) ... ok
test_lock (test.test_multiprocessing_forkserver.TestForkAwareThreadLock) ... ok
test_ignore (test.test_multiprocessing_forkserver.TestIgnoreEINTR) ... ok
test_ignore_listener (test.test_multiprocessing_forkserver.TestIgnoreEINTR) ... ok
test_manager_initializer (test.test_multiprocessing_forkserver.TestInitializers) ... ok
test_pool_initializer (test.test_multiprocessing_forkserver.TestInitializers) ... ok
test_invalid_family (test.test_multiprocessing_forkserver.TestInvalidFamily) ... ok
test_invalid_family_win32 (test.test_multiprocessing_forkserver.TestInvalidFamily) ... skipped 'skipped on non-Windows platforms'
test_invalid_handles (test.test_multiprocessing_forkserver.TestInvalidHandle) ... ok
test_noforkbomb (test.test_multiprocessing_forkserver.TestNoForkBomb) ... ok
test_release_unused_processes (test.test_multiprocessing_forkserver.TestPoolNotLeakOnFailure) ... ok
test_semaphore_tracker (test.test_multiprocessing_forkserver.TestSemaphoreTracker) ... ok
test_semaphore_tracker_sigint (test.test_multiprocessing_forkserver.TestSemaphoreTracker) ... ok
test_semaphore_tracker_sigkill (test.test_multiprocessing_forkserver.TestSemaphoreTracker) ... ok
test_semaphore_tracker_sigterm (test.test_multiprocessing_forkserver.TestSemaphoreTracker) ... ok
test_empty (test.test_multiprocessing_forkserver.TestSimpleQueue) ... ok
test_context (test.test_multiprocessing_forkserver.TestStartMethod) ... ok
test_get_all (test.test_multiprocessing_forkserver.TestStartMethod) ... ok
test_preload_resources (test.test_multiprocessing_forkserver.TestStartMethod) ... ok
test_set_get (test.test_multiprocessing_forkserver.TestStartMethod) ... ok
test_flushing (test.test_multiprocessing_forkserver.TestStdinBadfiledescriptor) ... ok
test_pool_in_process (test.test_multiprocessing_forkserver.TestStdinBadfiledescriptor) ... ok
test_queue_in_process (test.test_multiprocessing_forkserver.TestStdinBadfiledescriptor) ... ok
test_timeout (test.test_multiprocessing_forkserver.TestTimeouts) ... ok
test_neg_timeout (test.test_multiprocessing_forkserver.TestWait) ... ok
test_wait (test.test_multiprocessing_forkserver.TestWait) ... ok
test_wait_integer (test.test_multiprocessing_forkserver.TestWait) ... ok
test_wait_slow (test.test_multiprocessing_forkserver.TestWait) ... ok
test_wait_socket (test.test_multiprocessing_forkserver.TestWait) ... ok
test_wait_socket_slow (test.test_multiprocessing_forkserver.TestWait) ... ok
test_wait_timeout (test.test_multiprocessing_forkserver.TestWait) ... ok
test_abort (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_abort_and_reset (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_action (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_barrier (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_barrier_10 (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_default_timeout (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_reset (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_single_thread (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_thousand (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... skipped 'test not appropriate for manager'
test_timeout (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_wait_return (test.test_multiprocessing_forkserver.WithManagerTestBarrier) ... ok
test_notify (test.test_multiprocessing_forkserver.WithManagerTestCondition) ... ok
test_notify_all (test.test_multiprocessing_forkserver.WithManagerTestCondition) ... ok
test_notify_n (test.test_multiprocessing_forkserver.WithManagerTestCondition) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithManagerTestCondition) ... ok
test_wait_result (test.test_multiprocessing_forkserver.WithManagerTestCondition) ... ok
test_waitfor (test.test_multiprocessing_forkserver.WithManagerTestCondition) ... ok
test_waitfor_timeout (test.test_multiprocessing_forkserver.WithManagerTestCondition) ... ok
test_dict (test.test_multiprocessing_forkserver.WithManagerTestContainers) ... ok
test_dict_iter (test.test_multiprocessing_forkserver.WithManagerTestContainers) ... ok
test_dict_proxy_nested (test.test_multiprocessing_forkserver.WithManagerTestContainers) ... ok
test_list (test.test_multiprocessing_forkserver.WithManagerTestContainers) ... ok
test_list_iter (test.test_multiprocessing_forkserver.WithManagerTestContainers) ... ok
test_list_proxy_in_list (test.test_multiprocessing_forkserver.WithManagerTestContainers) ... ok
test_namespace (test.test_multiprocessing_forkserver.WithManagerTestContainers) ... ok
test_event (test.test_multiprocessing_forkserver.WithManagerTestEvent) ... ok
test_lock (test.test_multiprocessing_forkserver.WithManagerTestLock) ... ok
test_lock_context (test.test_multiprocessing_forkserver.WithManagerTestLock) ... ok
test_rlock (test.test_multiprocessing_forkserver.WithManagerTestLock) ... ok
test_rapid_restart (test.test_multiprocessing_forkserver.WithManagerTestManagerRestart) ... ok
test_mymanager (test.test_multiprocessing_forkserver.WithManagerTestMyManager) ... ok
test_mymanager_context (test.test_multiprocessing_forkserver.WithManagerTestMyManager) ... ok
test_mymanager_context_prestarted (test.test_multiprocessing_forkserver.WithManagerTestMyManager) ... ok
test_apply (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_async (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_async_timeout (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_context (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_del_pool (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_empty_iterable (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_imap (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_imap_handle_iterable_exception (test.test_multiprocessing_forkserver.WithManagerTestPool) ... skipped 'test not appropriate for manager'
test_imap_unordered (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_imap_unordered_handle_iterable_exception (test.test_multiprocessing_forkserver.WithManagerTestPool) ... skipped 'test not appropriate for manager'
test_make_pool (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_map (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_map_async (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_map_async_callbacks (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_map_chunksize (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_map_handle_iterable_exception (test.test_multiprocessing_forkserver.WithManagerTestPool) ... skipped 'test not appropriate for manager'
test_map_no_failfast (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_map_unplicklable (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_release_task_refs (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_starmap (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_starmap_async (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_terminate (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_traceback (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_wrapped_exception (test.test_multiprocessing_forkserver.WithManagerTestPool) ... ok
test_closed_queue_put_get_exceptions (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... ok
test_fork (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... ok
test_get (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... ok
test_no_import_lock_contention (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... ok
test_put (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... ok
test_qsize (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... ok
test_queue_feeder_donot_stop_onexc (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... skipped 'test not appropriate for manager'
test_queue_feeder_on_queue_feeder_error (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... skipped 'test not appropriate for manager'
test_task_done (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithManagerTestQueue) ... ok
test_remote (test.test_multiprocessing_forkserver.WithManagerTestRemoteManager) ... ok
test_bounded_semaphore (test.test_multiprocessing_forkserver.WithManagerTestSemaphore) ... ok
test_semaphore (test.test_multiprocessing_forkserver.WithManagerTestSemaphore) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithManagerTestSemaphore) ... skipped 'test not appropriate for manager'
test_array (test.test_multiprocessing_forkserver.WithProcessesTestArray) ... ok
test_array_from_size (test.test_multiprocessing_forkserver.WithProcessesTestArray) ... ok
test_getobj_getlock_obj (test.test_multiprocessing_forkserver.WithProcessesTestArray) ... ok
test_rawarray (test.test_multiprocessing_forkserver.WithProcessesTestArray) ... ok
test_abort (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_abort_and_reset (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_action (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_barrier (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_barrier_10 (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_default_timeout (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_reset (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_single_thread (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_thousand (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_wait_return (test.test_multiprocessing_forkserver.WithProcessesTestBarrier) ... ok
test_notify (test.test_multiprocessing_forkserver.WithProcessesTestCondition) ... ok
test_notify_all (test.test_multiprocessing_forkserver.WithProcessesTestCondition) ... ok
test_notify_n (test.test_multiprocessing_forkserver.WithProcessesTestCondition) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithProcessesTestCondition) ... ok
test_wait_result (test.test_multiprocessing_forkserver.WithProcessesTestCondition) ... ok
test_waitfor (test.test_multiprocessing_forkserver.WithProcessesTestCondition) ... ok
test_waitfor_timeout (test.test_multiprocessing_forkserver.WithProcessesTestCondition) ... ok
test_connection (test.test_multiprocessing_forkserver.WithProcessesTestConnection) ... ok
test_context (test.test_multiprocessing_forkserver.WithProcessesTestConnection) ... ok
test_duplex_false (test.test_multiprocessing_forkserver.WithProcessesTestConnection) ... ok
test_fd_transfer (test.test_multiprocessing_forkserver.WithProcessesTestConnection) ... ok
test_large_fd_transfer (test.test_multiprocessing_forkserver.WithProcessesTestConnection) ... ok
test_missing_fd_transfer (test.test_multiprocessing_forkserver.WithProcessesTestConnection) ... ok
test_sendbytes (test.test_multiprocessing_forkserver.WithProcessesTestConnection) ... ok
test_spawn_close (test.test_multiprocessing_forkserver.WithProcessesTestConnection) ... ok
test_event (test.test_multiprocessing_forkserver.WithProcessesTestEvent) ... ok
test_finalize (test.test_multiprocessing_forkserver.WithProcessesTestFinalize) ... ok
test_thread_safety (test.test_multiprocessing_forkserver.WithProcessesTestFinalize) ... ok
test_free_from_gc (test.test_multiprocessing_forkserver.WithProcessesTestHeap) ... ok
test_heap (test.test_multiprocessing_forkserver.WithProcessesTestHeap) ... ok
test_context (test.test_multiprocessing_forkserver.WithProcessesTestListener) ... ok
test_multiple_bind (test.test_multiprocessing_forkserver.WithProcessesTestListener) ... ok
test_issue14725 (test.test_multiprocessing_forkserver.WithProcessesTestListenerClient) ... ok
test_issue16955 (test.test_multiprocessing_forkserver.WithProcessesTestListenerClient) ... ok
test_listener_client (test.test_multiprocessing_forkserver.WithProcessesTestListenerClient) ... ok
test_lock (test.test_multiprocessing_forkserver.WithProcessesTestLock) ... ok
test_lock_context (test.test_multiprocessing_forkserver.WithProcessesTestLock) ... ok
test_rlock (test.test_multiprocessing_forkserver.WithProcessesTestLock) ... ok
test_enable_logging (test.test_multiprocessing_forkserver.WithProcessesTestLogging) ... ok
test_level (test.test_multiprocessing_forkserver.WithProcessesTestLogging) ... ok
test_rapid_restart (test.test_multiprocessing_forkserver.WithProcessesTestManagerRestart) ... ok
test_access (test.test_multiprocessing_forkserver.WithProcessesTestPicklingConnections) ... ok
test_pickling (test.test_multiprocessing_forkserver.WithProcessesTestPicklingConnections) ... ok
test_boundaries (test.test_multiprocessing_forkserver.WithProcessesTestPoll) ... ok
test_dont_merge (test.test_multiprocessing_forkserver.WithProcessesTestPoll) ... ok
test_empty_string (test.test_multiprocessing_forkserver.WithProcessesTestPoll) ... ok
test_strings (test.test_multiprocessing_forkserver.WithProcessesTestPoll) ... ok
test_poll_eintr (test.test_multiprocessing_forkserver.WithProcessesTestPollEintr) ... ok
test_apply (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_async (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_async_timeout (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_context (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_del_pool (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_empty_iterable (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_imap (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_imap_handle_iterable_exception (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_imap_unordered (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_imap_unordered_handle_iterable_exception (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_make_pool (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_map (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_map_async (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_map_async_callbacks (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_map_chunksize (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_map_handle_iterable_exception (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_map_no_failfast (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_map_unplicklable (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_release_task_refs (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_starmap (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_starmap_async (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_terminate (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_traceback (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_wrapped_exception (test.test_multiprocessing_forkserver.WithProcessesTestPool) ... ok
test_async_error_callback (test.test_multiprocessing_forkserver.WithProcessesTestPoolWorkerErrors) ... ok
test_unpickleable_result (test.test_multiprocessing_forkserver.WithProcessesTestPoolWorkerErrors) ... ok
test_pool_worker_lifetime (test.test_multiprocessing_forkserver.WithProcessesTestPoolWorkerLifetime) ... ok
test_pool_worker_lifetime_early_close (test.test_multiprocessing_forkserver.WithProcessesTestPoolWorkerLifetime) ... ok
test_active_children (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_child_fd_inflation (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_close (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_cpu_count (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_current (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_daemon_argument (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_error_on_stdio_flush_1 (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_error_on_stdio_flush_2 (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_forkserver_sigint (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_forkserver_sigkill (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_kill (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_lose_target_ref (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_many_processes (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_process (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_recursion (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_sentinel (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_terminate (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_wait_for_threads (test.test_multiprocessing_forkserver.WithProcessesTestProcess) ... ok
test_closed_queue_put_get_exceptions (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_fork (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_get (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_no_import_lock_contention (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_put (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_qsize (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_queue_feeder_donot_stop_onexc (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_queue_feeder_on_queue_feeder_error (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_task_done (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithProcessesTestQueue) ... ok
test_bounded_semaphore (test.test_multiprocessing_forkserver.WithProcessesTestSemaphore) ... ok
test_semaphore (test.test_multiprocessing_forkserver.WithProcessesTestSemaphore) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithProcessesTestSemaphore) ... ok
test_copy (test.test_multiprocessing_forkserver.WithProcessesTestSharedCTypes) ... ok
test_sharedctypes (test.test_multiprocessing_forkserver.WithProcessesTestSharedCTypes) ... ok
test_synchronize (test.test_multiprocessing_forkserver.WithProcessesTestSharedCTypes) ... ok
test_stderr_flush (test.test_multiprocessing_forkserver.WithProcessesTestSubclassingProcess) ... ok
test_subclassing (test.test_multiprocessing_forkserver.WithProcessesTestSubclassingProcess) ... ok
test_sys_exit (test.test_multiprocessing_forkserver.WithProcessesTestSubclassingProcess) ... ok
test_getobj_getlock (test.test_multiprocessing_forkserver.WithProcessesTestValue) ... ok
test_rawvalue (test.test_multiprocessing_forkserver.WithProcessesTestValue) ... ok
test_value (test.test_multiprocessing_forkserver.WithProcessesTestValue) ... ok
test_abort (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_abort_and_reset (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_action (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_barrier (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_barrier_10 (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_default_timeout (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_reset (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_single_thread (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_thousand (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_wait_return (test.test_multiprocessing_forkserver.WithThreadsTestBarrier) ... ok
test_notify (test.test_multiprocessing_forkserver.WithThreadsTestCondition) ... ok
test_notify_all (test.test_multiprocessing_forkserver.WithThreadsTestCondition) ... ok
test_notify_n (test.test_multiprocessing_forkserver.WithThreadsTestCondition) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithThreadsTestCondition) ... ok
test_wait_result (test.test_multiprocessing_forkserver.WithThreadsTestCondition) ... ok
test_waitfor (test.test_multiprocessing_forkserver.WithThreadsTestCondition) ... ok
test_waitfor_timeout (test.test_multiprocessing_forkserver.WithThreadsTestCondition) ... ok
test_connection (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ... ok
test_context (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ... ok
test_duplex_false (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ... ok
test_fd_transfer (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ... skipped 'only makes sense with processes'
test_large_fd_transfer (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ... skipped 'only makes sense with processes'
test_missing_fd_transfer (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ... skipped 'only makes sense with processes'
test_sendbytes (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ... skipped 'test not appropriate for threads'
test_spawn_close (test.test_multiprocessing_forkserver.WithThreadsTestConnection) ... ok
test_event (test.test_multiprocessing_forkserver.WithThreadsTestEvent) ... ok
test_issue14725 (test.test_multiprocessing_forkserver.WithThreadsTestListenerClient) ... ok
test_issue16955 (test.test_multiprocessing_forkserver.WithThreadsTestListenerClient) ... ok
test_listener_client (test.test_multiprocessing_forkserver.WithThreadsTestListenerClient) ... ok
test_lock (test.test_multiprocessing_forkserver.WithThreadsTestLock) ... ok
test_lock_context (test.test_multiprocessing_forkserver.WithThreadsTestLock) ... ok
test_rlock (test.test_multiprocessing_forkserver.WithThreadsTestLock) ... ok
test_rapid_restart (test.test_multiprocessing_forkserver.WithThreadsTestManagerRestart) ... ok
Warning -- Dangling processes: {<ForkServerProcess(QueueManager-479, started)>}
test_boundaries (test.test_multiprocessing_forkserver.WithThreadsTestPoll) ... ok
test_dont_merge (test.test_multiprocessing_forkserver.WithThreadsTestPoll) ... ok
test_empty_string (test.test_multiprocessing_forkserver.WithThreadsTestPoll) ... ok
test_strings (test.test_multiprocessing_forkserver.WithThreadsTestPoll) ... ok
test_apply (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_async (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_async_timeout (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_context (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_del_pool (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_empty_iterable (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_imap (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_imap_handle_iterable_exception (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_imap_unordered (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_imap_unordered_handle_iterable_exception (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_make_pool (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_map (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_map_async (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_map_async_callbacks (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_map_chunksize (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_map_handle_iterable_exception (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_map_no_failfast (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_map_unplicklable (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... skipped 'test not appropriate for threads'
test_release_task_refs (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_starmap (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_starmap_async (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_terminate (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_traceback (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_wrapped_exception (test.test_multiprocessing_forkserver.WithThreadsTestPool) ... ok
test_active_children (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... ok
test_child_fd_inflation (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_close (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_cpu_count (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... ok
test_current (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_daemon_argument (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_error_on_stdio_flush_1 (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... ok
test_error_on_stdio_flush_2 (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... ok
test_forkserver_sigint (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_forkserver_sigkill (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_kill (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_lose_target_ref (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... ok
test_many_processes (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_process (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... ok
test_recursion (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... ok
test_sentinel (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_terminate (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_wait_for_threads (test.test_multiprocessing_forkserver.WithThreadsTestProcess) ... skipped 'test not appropriate for threads'
test_closed_queue_put_get_exceptions (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... ok
test_fork (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... ok
test_get (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... ok
test_no_import_lock_contention (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... ok
test_put (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... ok
test_qsize (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... ok
test_queue_feeder_donot_stop_onexc (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... skipped 'test not appropriate for threads'
test_queue_feeder_on_queue_feeder_error (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... skipped 'test not appropriate for threads'
test_task_done (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithThreadsTestQueue) ... ok
test_bounded_semaphore (test.test_multiprocessing_forkserver.WithThreadsTestSemaphore) ... ok
test_semaphore (test.test_multiprocessing_forkserver.WithThreadsTestSemaphore) ... ok
test_timeout (test.test_multiprocessing_forkserver.WithThreadsTestSemaphore) ... skipped 'test not appropriate for threads'
test_import (test.test_multiprocessing_forkserver._TestImportStar) ... ok
Warning -- Dangling processes: {<ForkServerProcess(QueueManager-479, stopped)>}

----------------------------------------------------------------------

Ran 321 tests in 189.499s

OK (skipped=27)
test_tk skipped -- No module named '_tkinter'
test_turtle skipped -- No module named '_tkinter'
test_gdb skipped -- gdb versions before 7.0 didn't support python embedding. Saw 6.1:
GNU gdb 6.1.1 [FreeBSD]
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "amd64-marcel-freebsd".
test_winreg skipped -- No module named 'winreg'
test_ioctl skipped -- Unable to open /dev/tty
test_startfile skipped -- object <module 'os' from '/usr/home/buildbot/python/3.x.koobs-freebsd10.nondebug/build/Lib/os.py'> has no attribute 'startfile'
test_msilib skipped -- No module named '_msi'
test_dbm_gnu skipped -- No module named '_gdbm'
test_ttk_guionly skipped -- No module named '_tkinter'
test_ttk_textonly skipped -- No module named '_tkinter'
test_ssl skipped -- No module named '_ssl'
test_ossaudiodev skipped -- [Errno 2] No such file or directory: '/dev/dsp'
test_epoll skipped -- test works only on Linux 2.6
test_spwd skipped -- No module named 'spwd'
test_tcl skipped -- No module named '_tkinter'
test_devpoll skipped -- test works only on Solaris OS family
test_winsound skipped -- No module named 'winsound'
stty: stdin isn't a terminal

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

6 participants