Skip to content

Instantly share code, notes, and snippets.

@RonnyPfannschmidt
Created July 4, 2012 21:44
Show Gist options
  • Save RonnyPfannschmidt/3049702 to your computer and use it in GitHub Desktop.
Save RonnyPfannschmidt/3049702 to your computer and use it in GitHub Desktop.
% pypy-bin -m unittest test.test_oddball.ThreadingTest
MainThread: <TestThread(Thread-1, initial)>.start(): starting thread
<OS thread 139821105706752>: <Condition(<thread.lock object at 0x0000000003154260>, 0)>.notify(): no waiters
Thread-1: <TestThread(Thread-1, started 139821105706752)>.__bootstrap(): thread started
Thread-1: <TestThread(Thread-1, started 139821105706752)>.__bootstrap(): registering trace hook
Thread-1: <TestThread(Thread-1, started 139821105706752)>.__bootstrap(): normal return
Thread-1: <Condition(<thread.lock object at 0x0000000003154270>, 0)>.notify(): no waiters
MainThread: <TestThread(Thread-1, stopped 139821105706752)>.join(): thread stopped
Coverage.py warning: Trace function changed, measurement is likely wrong: None
FMainThread: <Thread(Thread-2, initial)>.start(): starting thread
<OS thread 139821105706752>: <Condition(<thread.lock object at 0x000000000316dca0>, 1)>.notify(): notifying 1 waiter
Thread-2: <Thread(Thread-2, started 139821105706752)>.__bootstrap(): thread started
Thread-2: <Thread(Thread-2, started 139821105706752)>.__bootstrap(): registering trace hook
Thread-2: <Thread(Thread-2, started 139821105706752)>.__bootstrap(): normal return
Thread-2: <Condition(<thread.lock object at 0x000000000316dcb0>, 0)>.notify(): no waiters
MainThread: <Condition(<thread.lock object at 0x000000000316dca0>, 0)>.wait(): got it
MainThread: <Thread(Thread-2, stopped 139821105706752)>.join(): thread stopped
Coverage.py warning: Trace function changed, measurement is likely wrong: None
F
======================================================================
FAIL: test_thread_run (test.test_oddball.ThreadingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_oddball.py", line 53, in test_thread_run
[1,3,4,5,6,7,9,10,12,13,14], "")
File "test/coveragetest.py", line 320, in check_coverage
self.assertEqual(analysis.missing_formatted(), missing)
AssertionError: '5-7, 10' != ''
======================================================================
FAIL: test_threading (test.test_oddball.ThreadingTest)
----------------------------------------------------------------------
Traceback (most recent call last):
File "test/test_oddball.py", line 34, in test_threading
[1,3,4,6,7,9,10,12,13,14,15], "10")
File "test/coveragetest.py", line 320, in check_coverage
self.assertEqual(analysis.missing_formatted(), missing)
AssertionError: '7, 10' != '10'
----------------------------------------------------------------------
Ran 2 tests in 0.046s
FAILED (failures=2)
% pypy-bin -m unittest test.test_oddball.ThreadingTest
MainThread: <TestThread(Thread-1, initial)>.start(): starting thread
<OS thread 140229712934656>: <Condition(<thread.lock object at 0x0000000003188260>, 0)>.notify(): no waiters
Thread-1: <TestThread(Thread-1, started 140229712934656)>.__bootstrap(): thread started
Thread-1: <TestThread(Thread-1, started 140229712934656)>.__bootstrap(): registering trace hook
Thread-1: <TestThread(Thread-1, started 140229712934656)>.__bootstrap(): normal return
Thread-1: <Condition(<thread.lock object at 0x0000000003188270>, 0)>.notify(): no waiters
MainThread: <TestThread(Thread-1, started 140229712934656)>.join(): waiting until thread stops
MainThread: <TestThread(Thread-1, stopped 140229712934656)>.join(): thread stopped
Coverage.py warning: Trace function changed, measurement is likely wrong: None
.MainThread: <Thread(Thread-2, initial)>.start(): starting thread
<OS thread 140229712934656>: <Condition(<thread.lock object at 0x00000000031ae950>, 1)>.notify(): notifying 1 waiter
MainThread: <Condition(<thread.lock object at 0x00000000031ae950>, 1)>.wait(): got it
MainThread: <Thread(Thread-2, started 140229712934656)>.join(): waiting until thread stops
Thread-2: <Thread(Thread-2, started 140229712934656)>.__bootstrap(): thread started
Thread-2: <Thread(Thread-2, started 140229712934656)>.__bootstrap(): registering trace hook
Thread-2: <Thread(Thread-2, started 140229712934656)>.__bootstrap(): normal return
Thread-2: <Condition(<thread.lock object at 0x00000000031ae960>, 1)>.notify(): notifying 1 waiter
MainThread: <Condition(<thread.lock object at 0x00000000031ae960>, 1)>.wait(): got it
MainThread: <Thread(Thread-2, stopped 140229712934656)>.join(): thread stopped
Coverage.py warning: Trace function changed, measurement is likely wrong: None
.
----------------------------------------------------------------------
Ran 2 tests in 0.046s
OK
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment