blob: 0f8b5131cd03eb2ca71b0af4764d43cc0e51edcf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
|
# Copyright (C) by Josh Blum. See LICENSE.txt for licensing information.
import unittest
import gras
class ThreadPoolTest(unittest.TestCase):
def test_make_config(self):
c = gras.ThreadPoolConfig()
print c.thread_count
print c.yield_strategy
def test_make_tp(self):
c = gras.ThreadPoolConfig()
tp = gras.ThreadPool(c)
def test_make_tp_set_active(self):
c = gras.ThreadPoolConfig()
tp = gras.ThreadPool(c)
tp.set_active()
def test_thread_priority(self):
#here we assume prio 0.0 (default) can always be set
self.assertTrue(gras.ThreadPool.test_thread_priority(0.0))
if __name__ == '__main__':
unittest.main()
|