1
0
mirror of https://github.com/openSUSE/osc.git synced 2024-12-24 17:16:12 +01:00

- tests.test_difffiles: added TODO to __canonise_diff.

This commit is contained in:
Marcus Huewe 2013-01-18 16:37:08 +01:00
parent ef0f24c2f6
commit 203a4eeab5

View File

@ -315,6 +315,9 @@ Binary file 'binary' has changed.
#
# so we need to canonise the output to avoid false negative
# test failures.
# TODO: Package.get_diff should return a consistent format
# (regardless of the used python version)
def __canonise_diff(diff):
diff = re.sub('^@@ -(\d+) ', '@@ -\\1,\\1 ', diff, 0, re.MULTILINE)
diff = re.sub('^(@@ -\d+,\d+) \+(\d+) ', '\\1 +\\2,\\2 ', diff, 0, re.MULTILINE)