blob: d8050d21b153ca1c727f4a3ef3af6266c6ebd45a (
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
|
--- a/tests/test_multiprocessing.py
+++ b/tests/test_multiprocessing.py
@@ -11,18 +11,20 @@
from iniparse import ini
+def _getxy(_q, _w):
+ _cfg = _q.get_nowait()
+ _w.put(_cfg.x.y)
+
+
class TestIni(unittest.TestCase):
"""Test sending INIConfig objects."""
def test_queue(self):
- def getxy(_q, _w):
- _cfg = _q.get_nowait()
- _w.put(_cfg.x.y)
cfg = ini.INIConfig()
cfg.x.y = '42'
q = Queue()
w = Queue()
q.put(cfg)
- p = Process(target=getxy, args=(q, w))
+ p = Process(target=_getxy, args=(q, w))
p.start()
self.assertEqual(w.get(timeout=1), '42')
|