From 2c6f072d11dd74a80a7f7751b70305a765921828 Mon Sep 17 00:00:00 2001 From: Ivan Malison Date: Thu, 25 Sep 2014 04:49:00 -0700 Subject: [PATCH] better logging when matches aren't working. --- vcr/matchers.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/vcr/matchers.py b/vcr/matchers.py index 4964b9f..d24875c 100644 --- a/vcr/matchers.py +++ b/vcr/matchers.py @@ -38,16 +38,16 @@ def headers(r1, r2): return r1.headers == r2.headers -def _log_matches(matches): +def _log_matches(r1, r2, matches): differences = [m for m in matches if not m[0]] if differences: log.debug( - 'Requests differ according to the following matchers: ' + - str(differences) + "Requests {0} and {1} differ according to " + "the following matchers: {2}".format(r1, r2, differences) ) def requests_match(r1, r2, matchers): matches = [(m(r1, r2), m) for m in matchers] - _log_matches(matches) + _log_matches(r1, r2, matches) return all([m[0] for m in matches]) -- 2.43.0