(condition, getRatioValue)
| 47 | return _ |
| 48 | |
| 49 | def _adjust(condition, getRatioValue): |
| 50 | if not any((conf.string, conf.notString, conf.regexp, conf.code)): |
| 51 | # Negative logic approach is used in raw page comparison scheme as that what is "different" than original |
| 52 | # PAYLOAD.WHERE.NEGATIVE response is considered as True; in switch based approach negative logic is not |
| 53 | # applied as that what is by user considered as True is that what is returned by the comparison mechanism |
| 54 | # itself |
| 55 | retVal = not condition if kb.negativeLogic and condition is not None and not getRatioValue else condition |
| 56 | else: |
| 57 | retVal = condition if not getRatioValue else (MAX_RATIO if condition else MIN_RATIO) |
| 58 | |
| 59 | return retVal |
| 60 | |
| 61 | def _comparison(page, headers, code, getRatioValue, pageLength): |
| 62 | threadData = getCurrentThreadData() |
no outgoing calls
no test coverage detected
searching dependent graphs…