forked from pool/python-pyquery
Accepting request 1082798 from devel:languages:python
OBS-URL: https://build.opensuse.org/request/show/1082798 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/python-pyquery?expand=0&rev=24
This commit is contained in:
commit
38b8c811ff
@ -2,8 +2,10 @@
|
|||||||
tests/test_pyquery.py | 11 ++++++++---
|
tests/test_pyquery.py | 11 ++++++++---
|
||||||
1 file changed, 8 insertions(+), 3 deletions(-)
|
1 file changed, 8 insertions(+), 3 deletions(-)
|
||||||
|
|
||||||
--- a/tests/test_pyquery.py
|
Index: pyquery-2.0.0/tests/test_pyquery.py
|
||||||
+++ b/tests/test_pyquery.py
|
===================================================================
|
||||||
|
--- pyquery-2.0.0.orig/tests/test_pyquery.py
|
||||||
|
+++ pyquery-2.0.0/tests/test_pyquery.py
|
||||||
@@ -7,9 +7,12 @@ import time
|
@@ -7,9 +7,12 @@ import time
|
||||||
from lxml import etree
|
from lxml import etree
|
||||||
from pyquery.pyquery import PyQuery as pq, no_default
|
from pyquery.pyquery import PyQuery as pq, no_default
|
||||||
@ -20,7 +22,7 @@
|
|||||||
|
|
||||||
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
|
sys.path.insert(0, os.path.dirname(os.path.dirname(__file__)))
|
||||||
|
|
||||||
@@ -835,6 +838,7 @@ class TestXMLNamespace(TestCase):
|
@@ -894,6 +897,7 @@ class TestXMLNamespace(TestCase):
|
||||||
self.assertEqual(repr(val), repr('b'))
|
self.assertEqual(repr(val), repr('b'))
|
||||||
|
|
||||||
|
|
||||||
@ -28,7 +30,7 @@
|
|||||||
class TestWebScrapping(TestCase):
|
class TestWebScrapping(TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
@@ -879,6 +883,7 @@ class TestWebScrappingEncoding(TestCase)
|
@@ -938,6 +942,7 @@ class TestWebScrappingEncoding(TestCase)
|
||||||
self.assertEqual(d('#pt-login').text(), u'Войти')
|
self.assertEqual(d('#pt-login').text(), u'Войти')
|
||||||
|
|
||||||
|
|
||||||
@ -36,3 +38,22 @@
|
|||||||
class TestWebScrappingTimeouts(TestCase):
|
class TestWebScrappingTimeouts(TestCase):
|
||||||
|
|
||||||
def setUp(self):
|
def setUp(self):
|
||||||
|
Index: pyquery-2.0.0/conftest.py
|
||||||
|
===================================================================
|
||||||
|
--- pyquery-2.0.0.orig/conftest.py
|
||||||
|
+++ pyquery-2.0.0/conftest.py
|
||||||
|
@@ -1,7 +1,12 @@
|
||||||
|
import os
|
||||||
|
import pytest
|
||||||
|
-from webtest import http
|
||||||
|
-from webtest.debugapp import debug_app
|
||||||
|
+
|
||||||
|
+try:
|
||||||
|
+ from webtest import http
|
||||||
|
+ from webtest.debugapp import debug_app
|
||||||
|
+except (ImportError, ModuleNotFoundError):
|
||||||
|
+ http = None
|
||||||
|
+
|
||||||
|
from urllib.request import urlopen
|
||||||
|
|
||||||
|
|
||||||
|
@ -1,3 +1,9 @@
|
|||||||
|
-------------------------------------------------------------------
|
||||||
|
Mon Apr 24 16:44:07 UTC 2023 - Daniel Garcia <daniel.garcia@suse.com>
|
||||||
|
|
||||||
|
- Update make_webtest_optional.patch to make the import optional in
|
||||||
|
conftest.py
|
||||||
|
|
||||||
-------------------------------------------------------------------
|
-------------------------------------------------------------------
|
||||||
Fri Apr 21 12:31:13 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
Fri Apr 21 12:31:13 UTC 2023 - Dirk Müller <dmueller@suse.com>
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user