diff --git a/Lib/test/test_pty.py b/Lib/test/test_pty.py index a45be284a95440..3114b868682b36 100644 --- a/Lib/test/test_pty.py +++ b/Lib/test/test_pty.py @@ -82,9 +82,8 @@ def expectedFailureIfStdinIsTTY(fun): pass return fun -def expectedFailureOnBSD(fun): - PLATFORM = platform.system() - if PLATFORM.endswith("BSD") or PLATFORM == "Darwin": +def expectedFailureIfNotLinux(fun): + if platform.system() != "Linux": return unittest.expectedFailure(fun) return fun @@ -314,7 +313,7 @@ def test_fork(self): os.close(master_fd) - @expectedFailureOnBSD + @expectedFailureIfNotLinux def test_master_read(self): debug("Calling pty.openpty()") master_fd, slave_fd = pty.openpty() diff --git a/Misc/NEWS.d/next/Library/2020-11-27-21-46-54.bpo-41818.IXmYhQ.rst b/Misc/NEWS.d/next/Library/2020-11-27-21-46-54.bpo-41818.IXmYhQ.rst new file mode 100644 index 00000000000000..d1878c6e1d8844 --- /dev/null +++ b/Misc/NEWS.d/next/Library/2020-11-27-21-46-54.bpo-41818.IXmYhQ.rst @@ -0,0 +1 @@ +Change expectedFailureOnBSD() to expectedFailureIfNotLinux() in test_pty.py because test_master_read() should be expected to fail on every platform that is not Linux; that includes Solaris. \ No newline at end of file