Commit Graph

54 Commits

Author SHA1 Message Date
Andrey Rakhmatullin 8729247213
Fix running simple tests with --reactor=default. (#6735) 2025-03-15 20:33:10 +01:00
Andrey Rakhmatullin d0dabbc097
Enable AsyncioSelectorReactor by default. (#6713)
* Enable AsyncioSelectorReactor by default.

* Improve get_crawler(), switch more tests to it.

* Fix the remaining default-reactor test failures.

* Address documentation feedback.

* Make pinned envs more consistent.
2025-03-12 01:18:30 +05:00
Andrey Rakhmatullin 93c076047b Add scrapy/utils/testproc.py to collect_ignore to silence a warning. 2025-03-02 21:19:24 +05:00
Andrey Rakhmatullin a898331d14
Preparations for switching to direct pytest. (#6678) 2025-02-16 20:28:58 +01:00
Emery Berger 5680bee968
Made path absolute to enable running pytest from a different directory. (#6567) 2024-12-09 11:01:00 +01:00
Andrey Rakhmatullin b042ad255d
Address some previously ignored pylint messages. (#6531) 2024-11-11 11:49:52 +01:00
Andrey Rakhmatullin d85c39f5bc
Deprecation removals. (#6500)
* Deprecation removals.

* Clean up the default pytest filterwarnings.

* Remove test_get_images_old().

* Redo boto-requiring test filtering.

* Remove an unused function.

* Improve the Crawler.crawl() error message.

* Fix the test.
2024-10-31 18:06:22 +05:00
Lucas Belo 4460d3ed96
Remove tests/requirements.txt and refactor extra deps (#6272)
Co-authored-by: lucasbelo777 <lucas.belo@cialdnb.com>
2024-03-13 07:22:48 +01:00
Andrey Rakhmatullin a346732275 Skip more non-test files during discovery. 2023-07-22 17:54:55 +04:00
Andrey Rakhmatullin e058a05763 Skip tests that don't work on Python 3.12. 2023-07-22 17:51:13 +04:00
Andrey Rakhmatullin 583df9f7d0 Simplify skipping uvloop tests. 2023-07-22 17:44:37 +04:00
Jalil SA a5c1ef8276 sort imports with isort 2023-01-25 14:25:15 -06:00
Emmanuel Rondan e211ec0aa2 adding black formatter to all the code 2022-11-29 11:30:46 -03:00
Mark Mayo f9a29f03d9
Address some issues reported by Pylint (#5677)
Co-authored-by: Felipe Boff Nunes <51033921+felipeboffnunes@users.noreply.github.com>
Co-authored-by: Andrey Rahmatullin <wrar@wrar.name>
2022-11-27 11:00:13 +01:00
Matthew Donoughe 40d9ca3bdd
use pathlib 2022-10-17 17:40:10 -04:00
Andrey Rakhmatullin 5fa613b419 Run flake8 directly. 2022-10-10 11:04:00 +06:00
Andrey Rahmatullin 144d1eb834
Add Deferred-to-Future helpers (#5288) 2021-10-22 18:46:01 +02:00
Vostretsov Nikita 23cfdb058e
Reducing amount of warnings during test run (#5162)
* put flake8 options into separate file to remove pytest warnings

* remove ResourceLeaked warning in pypy

* suppress warnings from twisted

* ignore deprecation warnings here

* ignore deprecation warning in tests of deprecated methods

* ignore deprecation warnings here

* update test classes

* don`t use deprecated method call

* ignore deprecation warnings here

* proper warning class

* more selective ignoring

* Revert "don`t use deprecated method call"

This reverts commit 59216ab560.
2021-05-28 14:45:06 +05:00
Adrián Chaves c5b1ee8101
Make Twisted[http2] installation optional (#5113)
Co-authored-by: Eugenio Lacuesta <eugenio.lacuesta@gmail.com>
2021-05-11 09:04:53 +02:00
Andrey Rakhmatullin 49af7c4c8b Drop pytest-twisted, use Scrapy code to install the reactor. 2021-02-18 17:10:30 +05:00
Andrey Rahmatullin c1cc3f2f42
Merge pull request #4761 from Gallaecio/on-the-fly-certificates
Generate localhost keys for tests on the fly
2020-09-02 13:37:44 +05:00
Andrey Rakhmatullin de640f41ec Merge back tests/py36/_test_crawl.py. 2020-08-28 18:27:36 +05:00
Adrián Chaves dd378b4bb1 Generate localhost keys for tests on the fly 2020-08-27 11:33:18 +02:00
Eugenio Lacuesta a44942d27d
Merge branch 'master' into response_ip_address 2020-02-23 18:13:52 -03:00
Andrey Rakhmatullin 7323780c97 Support yield in async def callbacks. 2020-02-07 21:32:45 +05:00
Eugenio Lacuesta 13670f0397
Ignore tests/CrawlerRunner directory 2020-02-03 16:16:43 -03:00
Andrey Rakhmatullin f75ccc997a FIx a typo in the only_asyncio fixture. 2019-12-27 19:48:54 +05:00
Andrey Rakhmatullin 900de7c146 Fix the reactor_pytest fixture. 2019-12-16 21:11:58 +05:00
Andrey Rakhmatullin 2db7d45378 Enable skipping tests based on --reactor. 2019-12-16 19:25:49 +05:00
Andrey Rakhmatullin 352ddbb336 Merge remote-tracking branch 'origin/master' into asyncio-base 2019-12-13 18:07:23 +05:00
Andrey Rahmatullin 02cdc53fb8
Add a test for a CrawlerProcess script. (#4218)
* Add a test for a CrawlerProcess script.

* Add tests/CrawlerProcess to collect_ignore.

* Remove an extra line.

* Fix/improve conftest.py.
2019-12-13 18:04:05 +05:00
Andrey Rakhmatullin cc19ab5439 Add tests that check asyncio support. 2019-12-04 21:32:56 +05:00
Andrey Rakhmatullin a7b640991d Rename tests/py3-ignores.txt to tests/ignores.txt. 2019-11-19 13:52:49 +05:00
Andrey Rakhmatullin e18014d84d Remove Python 2-only tests. 2019-11-19 13:52:49 +05:00
Marc Hernández e8b1e46e85 Add pytest-flake8 (#3945) 2019-11-07 14:05:01 +01:00
Eugenio Lacuesta c5612f387b
Remove deprecated xlib module 2019-09-13 14:32:05 -03:00
nyov 7a398b7086 Deprecation removals for Scrapy 1.7
Removing deprecations of 2015 and prior (pre-1.1)
2019-07-06 13:41:56 +00:00
Mikhail Korobov 36453348fa remove ancient modules kept only for error messages 2018-07-06 03:23:37 +05:00
Mikhail Korobov d4c7cc848b remove backwards compatibility shims for relocated modules 2018-07-06 03:19:43 +05:00
cclauss cd735e377c Simplify if statement 2016-01-18 07:45:36 +01:00
Alexander Sibiryakov c4d29ecaef Ignoring xlib/tx folder, depending on Twisted version. 2015-12-02 17:08:21 +01:00
Mikhail Korobov 9316b2317b remove scrapy.utils.testsite from PY3 ignores 2015-08-01 00:43:13 +05:00
Julia Medina 53fdaa3f70 scrapy/spider.py shim 2015-05-09 04:27:43 -03:00
Julia Medina 32945242ae scrapy/linkextractor.py shim 2015-05-09 03:28:39 -03:00
Julia Medina cfd40ed57f scrapy/command.py shim 2015-05-09 03:20:48 -03:00
Mikhail Korobov 8301d00fee TST don't collect tests from deprecated modules.
This removes some deprecation warnings in tests.
2015-05-02 02:24:27 +05:00
Julia Medina c2d716807a Use LogCapture in testfixtures package for tests
This allows to remove `get_testlog` helper, `flushLoggedErrors` from
twisted.trial.unittest.TestCase and Twisted log observers created for
each test on conftest.py.
2015-04-22 17:24:40 -03:00
Julia Medina ffc60910aa Remove djangoitem since we moved it to scrapy/scrapy-djangoitem 2015-04-19 13:09:25 -03:00
klangner@gmail.com a0299d97f5 fixed variable name 2015-02-10 10:34:44 +01:00
klangner 5ea4a72b8e py3-ignores.txt supports comments 2015-02-09 10:28:22 +01:00