Lines Matching refs:sms
3784 sms = shared_memory.SharedMemory(name_tsmb, create=True, size=512)
3785 self.addCleanup(sms.unlink)
3788 self.assertEqual(sms.name, name_tsmb)
3789 self.assertGreaterEqual(sms.size, 512)
3790 self.assertGreaterEqual(len(sms.buf), sms.size)
3793 self.assertIn(sms.name, str(sms))
3794 self.assertIn(str(sms.size), str(sms))
3797 sms.buf[0] = 42
3798 self.assertEqual(sms.buf[0], 42)
3806 same_sms = shared_memory.SharedMemory(name_tsmb, size=20*sms.size)
3807 self.assertLess(same_sms.size, 20*sms.size) # Size was ignored.
3883 self.assertEqual(ok_if_exists_sms.size, sms.size)
3892 sms.close()
3932 sms = shared_memory.SharedMemory(create=True, size=512)
3933 self.addCleanup(sms.unlink)
3934 sms.buf[0:6] = b'pickle'
3937 pickled_sms = pickle.dumps(sms, protocol=proto)
3942 self.assertEqual(sms.name, sms2.name)
3943 self.assertEqual(bytes(sms.buf[0:6]), b'pickle')
3947 sms.buf[0:6] = b'newval'
3948 self.assertEqual(bytes(sms.buf[0:6]), b'newval')
3952 self.assertEqual(bytes(sms.buf[0:6]), b'oldval')
3958 sms = shared_memory.SharedMemory(create=True, size=512)
3959 sms.buf[0:6] = b'pickle'
3960 pickled_sms = pickle.dumps(sms, protocol=proto)
3964 sms.close()
3965 sms.unlink()
3973 sms = shared_memory.SharedMemory(create=True, size=512)
3974 self.addCleanup(sms.unlink)
3979 args=(sms.name, b'howdy')
3984 self.assertEqual(bytes(sms.buf[:5]), b'howdy')
3989 args=(sms, b'HELLO')
3994 self.assertEqual(bytes(sms.buf[:5]), b'HELLO')
3996 sms.close()