14
0

Add skip_failing_test.patch to skip failing test on i586 and

ppc64* architectures.

OBS-URL: https://build.opensuse.org/package/show/devel:languages:python/python-xvfbwrapper?expand=0&rev=7
This commit is contained in:
2018-10-05 16:16:35 +00:00
committed by Git OBS Bridge
parent 7d08c31d48
commit 7797f7980c
3 changed files with 41 additions and 1 deletions

View File

@@ -1,3 +1,9 @@
-------------------------------------------------------------------
Fri Oct 5 18:15:25 CEST 2018 - Matěj Cepl <mcepl@suse.com>
- Add skip_failing_test.patch to skip failing test on i586 and
ppc64* architectures.
-------------------------------------------------------------------
Sun Jul 29 13:18:06 UTC 2018 - jengelh@inai.de

View File

@@ -12,7 +12,7 @@
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via http://bugs.opensuse.org/
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
@@ -25,6 +25,7 @@ License: MIT
Group: Development/Languages/Python
URL: https://github.com/cgoldberg/xvfbwrapper
Source: https://files.pythonhosted.org/packages/source/x/xvfbwrapper/xvfbwrapper-%{version}.tar.gz
Patch0: skip_failing_test.patch
BuildRequires: %{python_module devel}
BuildRequires: %{python_module setuptools}
BuildRequires: fdupes
@@ -46,6 +47,7 @@ Xvfb is useful for running acceptance tests on headless servers.
%prep
%setup -q -n xvfbwrapper-%{version}
%autopatch -p1
sed -i -e '/^#!\//, 1d' xvfbwrapper.py
%build

32
skip_failing_test.patch Normal file
View File

@@ -0,0 +1,32 @@
--- a/test_xvfb.py
+++ b/test_xvfb.py
@@ -1,6 +1,8 @@
#!/usr/bin/env python
+import logging
import os
+import platform
import sys
import unittest
try:
@@ -10,6 +12,11 @@ except ImportError:
from xvfbwrapper import Xvfb
+logging.basicConfig(format='%(levelname)s:%(funcName)s:%(message)s',
+ level=logging.DEBUG)
+log = logging.getLogger()
+
+log.debug('machine = %s', platform.machine())
class TestXvfb(unittest.TestCase):
@@ -83,6 +90,8 @@ class TestXvfb(unittest.TestCase):
self.assertEqual(display_var, os.environ['DISPLAY'])
self.assertIsNotNone(xvfb.proc)
+ @unittest.skipIf(platform.machine().lower() in ['i586', 'ppc64le', 'ppc64'],
+ 'This test does not work with this platform.')
def test_start_fails_with_unknown_kwargs(self):
xvfb = Xvfb(foo='bar')
with self.assertRaises(RuntimeError):