diff options
author | Jesse Noller <jnoller@gmail.com> | 2009-01-18 03:11:38 (GMT) |
---|---|---|
committer | Jesse Noller <jnoller@gmail.com> | 2009-01-18 03:11:38 (GMT) |
commit | b0516a6bc6cdc580846b075bc27b1d3281dd6295 (patch) | |
tree | 051beb24dbf3d805f6b8f1fd054c68031d1582bc /Lib/test | |
parent | 34f9b4c6f1b4129d8ded2cfd580687295bc9cb63 (diff) | |
download | cpython-b0516a6bc6cdc580846b075bc27b1d3281dd6295.zip cpython-b0516a6bc6cdc580846b075bc27b1d3281dd6295.tar.gz cpython-b0516a6bc6cdc580846b075bc27b1d3281dd6295.tar.bz2 |
Merge r68708 to py3k, fixes 4449
Diffstat (limited to 'Lib/test')
-rw-r--r-- | Lib/test/test_multiprocessing.py | 16 |
1 files changed, 14 insertions, 2 deletions
diff --git a/Lib/test/test_multiprocessing.py b/Lib/test/test_multiprocessing.py index a8600c0..4e5d759 100644 --- a/Lib/test/test_multiprocessing.py +++ b/Lib/test/test_multiprocessing.py @@ -830,10 +830,16 @@ class _TestValue(BaseTestCase): obj3 = val3.get_obj() self.assertEqual(lock, lock3) - arr4 = self.RawValue('i', 5) + arr4 = self.Value('i', 5, lock=False) self.assertFalse(hasattr(arr4, 'get_lock')) self.assertFalse(hasattr(arr4, 'get_obj')) + self.assertRaises(AttributeError, self.Value, 'i', 5, lock='navalue') + + arr5 = self.RawValue('i', 5) + self.assertFalse(hasattr(arr5, 'get_lock')) + self.assertFalse(hasattr(arr5, 'get_obj')) + class _TestArray(BaseTestCase): @@ -888,9 +894,15 @@ class _TestArray(BaseTestCase): obj3 = arr3.get_obj() self.assertEqual(lock, lock3) - arr4 = self.RawArray('i', list(range(10))) + arr4 = self.Array('i', range(10), lock=False) self.assertFalse(hasattr(arr4, 'get_lock')) self.assertFalse(hasattr(arr4, 'get_obj')) + self.assertRaises(AttributeError, + self.Array, 'i', range(10), lock='notalock') + + arr5 = self.RawArray('i', range(10)) + self.assertFalse(hasattr(arr5, 'get_lock')) + self.assertFalse(hasattr(arr5, 'get_obj')) # # |