scrapinghub / spidermon

Scrapy Extension for monitoring spiders execution.
https://spidermon.readthedocs.io
BSD 3-Clause "New" or "Revised" License
527 stars 96 forks source link

Split tests/test_monitors.py into per-monitor files. #297

Closed wRAR closed 3 years ago

wRAR commented 3 years ago

As suggested in #284 I've split the monolithic test_monitors.py. I've noticed that there is a pattern of MonitorSuite(monitors=[FooMonitor]) that is implemented as a function in 3 cases but as a fixture in 1 case, I think these usages should be made consistent.

This doesn't split multiple-scenario tests for UnwantedHTTPCodesMonitor, I'm fine with doing this here if suggested.

wRAR commented 3 years ago

The black test suggests reformatting two affected and one unaffected file (looks like it's different between 21.6b0 and 20.8b1).

rennerocha commented 3 years ago

The black test suggests reformatting two affected and one unaffected file (looks like it's different between 21.6b0 and 20.8b1).

black 21.5b2 stopped to add an empty space in docstrings. Could you please apply black on your code using the latest version?

codecov[bot] commented 3 years ago

Codecov Report

Merging #297 (f5b18e8) into master (4b84195) will not change coverage. The diff coverage is n/a.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #297   +/-   ##
=======================================
  Coverage   73.21%   73.21%           
=======================================
  Files          68       68           
  Lines        2972     2972           
  Branches      324      324           
=======================================
  Hits         2176     2176           
  Misses        735      735           
  Partials       61       61           

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update 4b84195...f5b18e8. Read the comment docs.