From 5a37af146f4f036168ac562918fca43adb4ac65f Mon Sep 17 00:00:00 2001 From: Jalil SA Date: Fri, 21 Apr 2023 01:29:57 -0600 Subject: [PATCH] Update documentation expectations for Parsel 1.8.0 (#5902) --- docs/intro/tutorial.rst | 8 ++++---- pytest.ini | 1 - tox.ini | 11 ++++++++--- 3 files changed, 12 insertions(+), 8 deletions(-) diff --git a/docs/intro/tutorial.rst b/docs/intro/tutorial.rst index 04d73d95a19..19a76fc16a4 100644 --- a/docs/intro/tutorial.rst +++ b/docs/intro/tutorial.rst @@ -252,7 +252,7 @@ object: .. code-block:: pycon >>> response.css("title") - [] + [] The result of running ``response.css('title')`` is a list-like object called :class:`~scrapy.selector.SelectorList`, which represents a list of @@ -348,7 +348,7 @@ Besides `CSS`_, Scrapy selectors also support using `XPath`_ expressions: .. code-block:: pycon >>> response.xpath("//title") - [] + [] >>> response.xpath("//title/text()").get() 'Quotes to Scrape' @@ -410,8 +410,8 @@ We get a list of selectors for the quote HTML elements with: .. code-block:: pycon >>> response.css("div.quote") - [, - , + [, + , ...] Each of the selectors returned by the query above allows us to run further diff --git a/pytest.ini b/pytest.ini index f5fbf252946..866f0c95039 100644 --- a/pytest.ini +++ b/pytest.ini @@ -5,7 +5,6 @@ python_files=test_*.py __init__.py python_classes= addopts = --assert=plain - --doctest-modules --ignore=docs/_ext --ignore=docs/conf.py --ignore=docs/news.rst diff --git a/tox.ini b/tox.ini index 06b52f3dc9a..9d81ec3e792 100644 --- a/tox.ini +++ b/tox.ini @@ -30,7 +30,7 @@ passenv = #allow tox virtualenv to upgrade pip/wheel/setuptools download = true commands = - pytest --cov=scrapy --cov-report=xml --cov-report= {posargs:--durations=10 docs scrapy tests} + pytest --cov=scrapy --cov-report=xml --cov-report= {posargs:--durations=10 docs scrapy tests} --doctest-modules install_command = python -I -m pip install -ctests/upper-constraints.txt {opts} {packages} @@ -99,6 +99,8 @@ setenv = _SCRAPY_PINNED=true install_command = python -I -m pip install {opts} {packages} +commands = + pytest --cov=scrapy --cov-report=xml --cov-report= {posargs:--durations=10 scrapy tests} [testenv:pinned] basepython = python3.7 @@ -108,6 +110,7 @@ deps = install_command = {[pinned]install_command} setenv = {[pinned]setenv} +commands = {[pinned]commands} [testenv:windows-pinned] basepython = python3 @@ -117,6 +120,7 @@ deps = install_command = {[pinned]install_command} setenv = {[pinned]setenv} +commands = {[pinned]commands} [testenv:extra-deps] basepython = python3 @@ -137,7 +141,7 @@ commands = [testenv:asyncio-pinned] deps = {[testenv:pinned]deps} -commands = {[testenv:asyncio]commands} +commands = {[pinned]commands} --reactor=asyncio install_command = {[pinned]install_command} setenv = {[pinned]setenv} @@ -152,7 +156,8 @@ basepython = {[testenv:pypy3]basepython} deps = {[pinned]deps} PyPyDispatcher==2.1.0 -commands = {[testenv:pypy3]commands} +commands = + pytest --durations=10 scrapy tests install_command = {[pinned]install_command} setenv = {[pinned]setenv}