Show More
@@ -37,7 +37,7 b' class TestsBase(object):' | |||||
37 |
|
37 | |||
38 | def fuzzy_compare(self, a, b, newlines_are_spaces=True, tabs_are_spaces=True, |
|
38 | def fuzzy_compare(self, a, b, newlines_are_spaces=True, tabs_are_spaces=True, | |
39 | fuzzy_spacing=True, ignore_spaces=False, |
|
39 | fuzzy_spacing=True, ignore_spaces=False, | |
40 | ignore_newlines=False, case_sensitive=False): |
|
40 | ignore_newlines=False, case_sensitive=False, leave_padding=False): | |
41 | """ |
|
41 | """ | |
42 | Performs a fuzzy comparison of two strings. A fuzzy comparison is a |
|
42 | Performs a fuzzy comparison of two strings. A fuzzy comparison is a | |
43 | comparison that ignores insignificant differences in the two comparands. |
|
43 | comparison that ignores insignificant differences in the two comparands. | |
@@ -45,6 +45,10 b' class TestsBase(object):' | |||||
45 | parameters of this method. |
|
45 | parameters of this method. | |
46 | """ |
|
46 | """ | |
47 |
|
47 | |||
|
48 | if not leave_padding: | |||
|
49 | a = a.strip() | |||
|
50 | b = b.strip() | |||
|
51 | ||||
48 | if ignore_newlines: |
|
52 | if ignore_newlines: | |
49 | a = a.replace('\n', '') |
|
53 | a = a.replace('\n', '') | |
50 | b = b.replace('\n', '') |
|
54 | b = b.replace('\n', '') |
General Comments 0
You need to be logged in to leave comments.
Login now