summaryrefslogtreecommitdiff
path: root/tests/test_check_parallel.py
Commit message (Collapse)AuthorAgeFilesLines
* Rename copying to license and upgrade the setup.cfg (#4338)Pierre Sassoulas2021-04-111-1/+1
|
* Update copyright notice with copyritePierre Sassoulas2021-02-281-1/+1
|
* Apply copyrite --contribution-thresholdPierre Sassoulas2021-02-211-1/+2
|
* mapreduce| Fixes -jN for map/reduce Checkers (e.g. SimilarChecker)Frank Harrison2021-01-021-6/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This integrate the map/reduce functionality into lint.check_process(). We previously had `map` being invoked, here we add `reduce` support. We do this by collecting the map-data by worker and then passing it to a reducer function on the Checker object, if available - determined by whether they confirm to the `mapreduce_checker.MapReduceMixin` mixin interface or nor. This allows Checker objects to function across file-streams when using multiprocessing/-j2+. For example SimilarChecker needs to be able to compare data across all files. The tests, that we also add here, check that a Checker instance returns and reports expected data and errors, such as error-messages and stats - at least in a exit-ok (0) situation. On a personal note, as we are copying more data across process boundaries, I suspect that the memory implications of this might cause issues for large projects already running with -jN and duplicate code detection on. That said, given that it takes a long time to perform lints of large code bases that is an issue for the [near?] future and likely to be part of the performance work. Either way but let's get it working first and deal with memory and perforamnce considerations later - I say this as there are many quick wins we can make here, e.g. file-batching, hashing lines, data compression and so on.
* Fix PytestCollectionWarning: cannot collect test class TestReporterPierre Sassoulas2020-11-281-1/+1
|
* review fixes| Annotates and makes explicit invalid types being pass to initFrank Harrison2020-10-191-6/+16
|
* review fixes| Fixes typosFrank Harrison2020-10-191-2/+2
|
* review fixes| Attempts to explain that the captured behaviour has changedFrank Harrison2020-10-191-1/+1
|
* review fixes| Remvoes debug print in testFrank Harrison2020-10-191-13/+0
|
* review fixes| Conform to snake-case fixtures, supported by pytestFrank Harrison2020-10-191-2/+2
| | | | (the legacy .unittest version was also supported)
* review fixes| Removes clarifying (IMO) variableFrank Harrison2020-10-191-2/+1
|
* review fixes| Removes spaces in comments (PEP-257)Frank Harrison2020-10-191-11/+11
|
* check_parallel| Fixes tests after upstream changesFrank Harrison2020-10-191-2/+6
|
* check_parallel| Adds paramterised test against #jobs, #files and #checkerFrank Harrison2020-10-191-1/+126
| | | | | These regression tests target future optimisation work for the check_parallel() system.
* check_parallel| Adds new test suite for multiple workers/check_parallelFrank Harrison2020-10-191-0/+262
These regression tests put check_parallel() and related functions under tests, ensuring that the functionality remains consistent ahead of any bug fixes and performance work we may do.