- Add skip-test_keepalive_ping_with_no_ping_timeout.patch for

gh#aaugustin/websockets#1026.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-websockets?expand=0&rev=28
This commit is contained in:
Matej Cepl 2021-08-10 07:52:37 +00:00 committed by Git OBS Bridge
parent 44a7704273
commit 99b8f93569
3 changed files with 28 additions and 1 deletions

View File

@ -2,6 +2,8 @@
Tue Aug 10 07:18:14 UTC 2021 - Matej Cepl <mcepl@suse.com>
- Use %pyunittest macro instead of doing it on our own.
- Add skip-test_keepalive_ping_with_no_ping_timeout.patch for
gh#aaugustin/websockets#1026.
-------------------------------------------------------------------
Sun Jun 6 12:00:22 UTC 2021 - Dirk Müller <dmueller@suse.com>

View File

@ -26,7 +26,11 @@ License: BSD-3-Clause
Group: Development/Languages/Python
URL: https://github.com/aaugustin/websockets
Source: https://github.com/aaugustin/websockets/archive/%{version}.tar.gz
# PATCH-FIX-UPSTREAM skip-test_keepalive_ping_with_no_ping_timeout.patch gh#aaugustin/websockets#1026 mcepl@suse.com
# Skip test test_keepalive_ping_with_no_ping_timeout
Patch0: skip-test_keepalive_ping_with_no_ping_timeout.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module pytest}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
BuildRequires: python-rpm-macros
@ -42,7 +46,7 @@ it provides an API based on coroutines, making it easy to write highly
concurrent applications.
%prep
%setup -q -n websockets-%{version}
%autosetup -p1 -n websockets-%{version}
%build
export CFLAGS="%{optflags}"

View File

@ -0,0 +1,21 @@
---
tests/legacy/test_protocol.py | 2 ++
1 file changed, 2 insertions(+)
--- a/tests/legacy/test_protocol.py
+++ b/tests/legacy/test_protocol.py
@@ -1,5 +1,6 @@
import asyncio
import contextlib
+import platform
import sys
import unittest
import unittest.mock
@@ -1189,6 +1190,7 @@ class CommonTests:
self.loop.run_until_complete(asyncio.sleep(4 * MS))
self.assertNoFrameSent()
+ @unittest.skipIf(platform.processor() == 'x86_64', 'gh#aaugustin/websockets#1026')
def test_keepalive_ping_with_no_ping_timeout(self):
self.restart_protocol_with_keepalive_ping(ping_timeout=None)