diff options
author | Christoph Reiter <creiter@src.gnome.org> | 2017-03-21 12:43:33 +0100 |
---|---|---|
committer | Christoph Reiter <creiter@src.gnome.org> | 2017-03-27 16:26:02 +0200 |
commit | ab574b6c40b6e58f396c9522be864a78478617c1 (patch) | |
tree | 50488491327422abb97e7a7bc0b3c147ce88054c /tests/test_mainloop.py | |
parent | 4da4a1d5c55a5db060bf3f67b708da0a00e3e957 (diff) | |
download | pygobject-ab574b6c40b6e58f396c9522be864a78478617c1.tar.gz |
tests: Remove TestMainLoop.test_concurrency
The code containing the bug no longer exists and the test doesn't do
what it says. The thread never gets terminated and it doesn't
assert anything. And I'm not sure what it should assert.
For the corresponding bug see
https://bugzilla.gnome.org/show_bug.cgi?id=663068
While the test doesn't hurt, it adds half a second wait time
to the test suite.
https://bugzilla.gnome.org/show_bug.cgi?id=698548
Diffstat (limited to 'tests/test_mainloop.py')
-rw-r--r-- | tests/test_mainloop.py | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/tests/test_mainloop.py b/tests/test_mainloop.py index 2728e090..5a903879 100644 --- a/tests/test_mainloop.py +++ b/tests/test_mainloop.py @@ -7,12 +7,6 @@ import signal import time import unittest -try: - from _thread import start_new_thread - start_new_thread # pyflakes -except ImportError: - # Python 2 - from thread import start_new_thread from gi.repository import GLib from compathelper import _bytes @@ -62,27 +56,6 @@ class TestMainLoop(unittest.TestCase): # self.assertFalse(got_exception) - @unittest.skipUnless(hasattr(signal, "SIGUSR1"), "no SIGUSR1") - def test_concurrency(self): - def on_usr1(signum, frame): - pass - - try: - # create a thread which will terminate upon SIGUSR1 by way of - # interrupting sleep() - orig_handler = signal.signal(signal.SIGUSR1, on_usr1) - start_new_thread(time.sleep, (10,)) - - # now create two main loops - loop1 = GLib.MainLoop() - loop2 = GLib.MainLoop() - GLib.timeout_add(100, lambda: os.kill(os.getpid(), signal.SIGUSR1)) - GLib.timeout_add(500, loop1.quit) - loop1.run() - loop2.quit() - finally: - signal.signal(signal.SIGUSR1, orig_handler) - @unittest.skipUnless(hasattr(os, "fork"), "no os.fork available") def test_sigint(self): pid = os.fork() |