mirror of https://github.com/scrapy/scrapy.git
Skip tests that don't work on Python 3.12.
This commit is contained in:
parent
583df9f7d0
commit
e058a05763
|
|
@ -87,6 +87,8 @@ def requires_uvloop(request):
|
|||
pytest.skip("uvloop does not support Windows")
|
||||
if twisted_version == Version("twisted", 21, 2, 0):
|
||||
pytest.skip("https://twistedmatrix.com/trac/ticket/10106")
|
||||
if sys.version_info >= (3, 12):
|
||||
pytest.skip("uvloop doesn't support Python 3.12 yet")
|
||||
|
||||
|
||||
def pytest_configure(config):
|
||||
|
|
|
|||
|
|
@ -1,15 +1,17 @@
|
|||
# Tests requirements
|
||||
attrs
|
||||
pyftpdlib
|
||||
# https://github.com/giampaolo/pyftpdlib/issues/560
|
||||
pyftpdlib; python_version < "3.12"
|
||||
pytest
|
||||
pytest-cov==4.0.0
|
||||
pytest-xdist
|
||||
sybil >= 1.3.0 # https://github.com/cjw296/sybil/issues/20#issuecomment-605433422
|
||||
testfixtures
|
||||
uvloop; platform_system != "Windows"
|
||||
# uvloop currently doesn't build on 3.12
|
||||
uvloop; platform_system != "Windows" and python_version < "3.12"
|
||||
|
||||
# optional for shell wrapper tests
|
||||
bpython
|
||||
# bpython requires greenlet which currently doesn't build on 3.12
|
||||
bpython; python_version < "3.12" # optional for shell wrapper tests
|
||||
brotli # optional for HTTP compress downloader middleware tests
|
||||
zstandard; implementation_name != 'pypy' # optional for HTTP compress downloader middleware tests
|
||||
ipython
|
||||
|
|
|
|||
|
|
@ -125,6 +125,9 @@ class FileFeedStorageTest(unittest.TestCase):
|
|||
path.unlink()
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.version_info >= (3, 12), reason="pyftpdlib doesn't support Python 3.12 yet"
|
||||
)
|
||||
class FTPFeedStorageTest(unittest.TestCase):
|
||||
def get_test_spider(self, settings=None):
|
||||
class TestSpider(scrapy.Spider):
|
||||
|
|
|
|||
|
|
@ -1,6 +1,7 @@
|
|||
import dataclasses
|
||||
import os
|
||||
import random
|
||||
import sys
|
||||
import time
|
||||
from datetime import datetime
|
||||
from io import BytesIO
|
||||
|
|
@ -11,6 +12,7 @@ from unittest import mock
|
|||
from urllib.parse import urlparse
|
||||
|
||||
import attr
|
||||
import pytest
|
||||
from itemadapter import ItemAdapter
|
||||
from twisted.internet import defer
|
||||
from twisted.trial import unittest
|
||||
|
|
@ -641,6 +643,9 @@ class TestGCSFilesStore(unittest.TestCase):
|
|||
store.bucket.get_blob.assert_called_with(expected_blob_path)
|
||||
|
||||
|
||||
@pytest.mark.skipif(
|
||||
sys.version_info >= (3, 12), reason="pyftpdlib doesn't support Python 3.12 yet"
|
||||
)
|
||||
class TestFTPFileStore(unittest.TestCase):
|
||||
@defer.inlineCallbacks
|
||||
def test_persist(self):
|
||||
|
|
|
|||
Loading…
Reference in New Issue