Sign Up
Log In
Log In
or
Sign Up
Places
All Projects
Status Monitor
Collapse sidebar
home:dirkmueller:branches:openSUSE:Factory:Rings:1-MinimalX
python-pyquery
make_webtest_optional.patch
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
File make_webtest_optional.patch of Package python-pyquery
diff -Nru pyquery-2.0.1.orig/conftest.py pyquery-2.0.1/conftest.py --- pyquery-2.0.1.orig/conftest.py 2024-08-30 10:12:19.000000000 +0200 +++ pyquery-2.0.1/conftest.py 2024-11-15 14:36:47.617602776 +0100 @@ -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 diff -Nru pyquery-2.0.1.orig/tests/test_pyquery.py pyquery-2.0.1/tests/test_pyquery.py --- pyquery-2.0.1.orig/tests/test_pyquery.py 2024-08-30 10:12:19.000000000 +0200 +++ pyquery-2.0.1/tests/test_pyquery.py 2024-11-15 14:36:47.607602471 +0100 @@ -7,9 +7,12 @@ from lxml import etree from pyquery.pyquery import PyQuery as pq, no_default from pyquery.openers import HAS_REQUEST -from webtest import http -from webtest.debugapp import debug_app -from unittest import TestCase +from unittest import TestCase, skipIf +try: + from webtest import http + from webtest.debugapp import debug_app +except (ImportError, ModuleNotFoundError): + http = None sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) @@ -888,6 +891,7 @@ self.assertEqual(repr(val), repr('b')) +@skipIf(http is None, "Cannot test without WebTest") class TestWebScrapping(TestCase): def setUp(self): @@ -932,6 +936,7 @@ self.assertEqual(d('#pt-login').text(), 'Войти') +@skipIf(http is None, "Cannot test without WebTest") class TestWebScrappingTimeouts(TestCase): def setUp(self):
Locations
Projects
Search
Status Monitor
Help
OpenBuildService.org
Documentation
API Documentation
Code of Conduct
Contact
Support
@OBShq
Terms
openSUSE Build Service is sponsored by
The Open Build Service is an
openSUSE project
.
Sign Up
Log In
Places
Places
All Projects
Status Monitor