aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2015-05-28 20:03:38 +0200
committerGuido Günther <agx@sigxcpu.org>2015-05-28 20:07:34 +0200
commitc4f82d3e1e281442441fa757e27a4b4f7dac7aba (patch)
treed565c1128e5782c7f91324a4ba80952c95a8d4bd
parent3894520a859995c6c4fea4761ec377918a01cf8c (diff)
Sort test result
to make it Python3 compatible
-rw-r--r--gbp/rpm/__init__.py16
1 files changed, 8 insertions, 8 deletions
diff --git a/gbp/rpm/__init__.py b/gbp/rpm/__init__.py
index 5784a7a9..51d2fa8f 100644
--- a/gbp/rpm/__init__.py
+++ b/gbp/rpm/__init__.py
@@ -902,14 +902,14 @@ def split_version_str(version):
@return: individual version components
@rtype: C{dict}
- >>> split_version_str("1")
- {'release': None, 'epoch': None, 'upstreamversion': '1'}
- >>> split_version_str("1.2.3-5.3")
- {'release': '5.3', 'epoch': None, 'upstreamversion': '1.2.3'}
- >>> split_version_str("3:1.2.3")
- {'release': None, 'epoch': '3', 'upstreamversion': '1.2.3'}
- >>> split_version_str("3:1-0")
- {'release': '0', 'epoch': '3', 'upstreamversion': '1'}
+ >>> sorted(split_version_str("1").items())
+ [('epoch', None), ('release', None), ('upstreamversion', '1')]
+ >>> sorted(split_version_str("1.2.3-5.3").items())
+ [('epoch', None), ('release', '5.3'), ('upstreamversion', '1.2.3')]
+ >>> sorted(split_version_str("3:1.2.3").items())
+ [('epoch', '3'), ('release', None), ('upstreamversion', '1.2.3')]
+ >>> sorted(split_version_str("3:1-0").items())
+ [('epoch', '3'), ('release', '0'), ('upstreamversion', '1')]
"""
ret = {'epoch': None, 'upstreamversion': None, 'release': None}