summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>2021-09-06 17:16:44 (GMT)
committerGitHub <noreply@github.com>2021-09-06 17:16:44 (GMT)
commit6b5aea2dc1bf7e117d40d6c9035d5c13124fd968 (patch)
tree935593db8d05dde894d4bad768f7408017bf7880
parentd5feb2b1f12a15c1a9bac094a8f6f77d0cfcbdc2 (diff)
downloadcpython-6b5aea2dc1bf7e117d40d6c9035d5c13124fd968.zip
cpython-6b5aea2dc1bf7e117d40d6c9035d5c13124fd968.tar.gz
cpython-6b5aea2dc1bf7e117d40d6c9035d5c13124fd968.tar.bz2
bpo-45052: Unskips a failing `test_shared_memory_basics` test (GH-28182)
(cherry picked from commit 19871fce3b74fc3f37e334a999e00d0ef65a8f1e) Co-authored-by: Nikita Sobolev <mail@sobolevn.me>
-rw-r--r--Lib/test/_test_multiprocessing.py2
-rw-r--r--Misc/NEWS.d/next/Tests/2021-09-06-19-00-29.bpo-45052.yrOK3J.rst7
2 files changed, 7 insertions, 2 deletions
diff --git a/Lib/test/_test_multiprocessing.py b/Lib/test/_test_multiprocessing.py
index a7cc1e5..087ab70 100644
--- a/Lib/test/_test_multiprocessing.py
+++ b/Lib/test/_test_multiprocessing.py
@@ -3771,7 +3771,6 @@ class _TestSharedMemory(BaseTestCase):
local_sms.buf[:len(binary_data)] = binary_data
local_sms.close()
- @unittest.skipIf(sys.platform == "win32", "test is broken on Windows")
def test_shared_memory_basics(self):
sms = shared_memory.SharedMemory('test01_tsmb', create=True, size=512)
self.addCleanup(sms.unlink)
@@ -3790,7 +3789,6 @@ class _TestSharedMemory(BaseTestCase):
pickled_sms = pickle.dumps(sms)
sms2 = pickle.loads(pickled_sms)
self.assertEqual(sms.name, sms2.name)
- self.assertEqual(sms.size, sms2.size)
self.assertEqual(bytes(sms.buf[0:6]), bytes(sms2.buf[0:6]), b'pickle')
# Modify contents of shared memory segment through memoryview.
diff --git a/Misc/NEWS.d/next/Tests/2021-09-06-19-00-29.bpo-45052.yrOK3J.rst b/Misc/NEWS.d/next/Tests/2021-09-06-19-00-29.bpo-45052.yrOK3J.rst
new file mode 100644
index 0000000..5c2e4f3
--- /dev/null
+++ b/Misc/NEWS.d/next/Tests/2021-09-06-19-00-29.bpo-45052.yrOK3J.rst
@@ -0,0 +1,7 @@
+``WithProcessesTestSharedMemory.test_shared_memory_basics`` test was
+ignored, because ``self.assertEqual(sms.size, sms2.size)`` line was failing.
+It is now removed and test is unskipped.
+
+The main motivation for this line to be removed from the test is that the
+``size`` of ``SharedMemory`` is not ever guaranteed to be the same. It is
+decided by the platform.