aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuido Günther <agx@sigxcpu.org>2011-06-24 19:09:41 +0200
committerGuido Günther <agx@sigxcpu.org>2011-06-24 19:10:54 +0200
commit6b8c201af50ac29c264c773558469069562cde6e (patch)
tree678abe55c2d9d59cb7f9ec025bc7b540b4eb64ff
parent3a68566193dbacd642960984383344d22e8930a6 (diff)
gbp-create-remote-repo: Drop comparison from doctests
Git-Dch: Ignore
-rwxr-xr-xgbp-create-remote-repo20
1 files changed, 12 insertions, 8 deletions
diff --git a/gbp-create-remote-repo b/gbp-create-remote-repo
index 4d48752..0653a9c 100755
--- a/gbp-create-remote-repo
+++ b/gbp-create-remote-repo
@@ -53,14 +53,18 @@ def parse_remote(remote_url, name, pkg):
"""
Sanity check our remote URL
- >>> parse_remote("ssh://host/path/%(pkg)s", "origin", "package") == {'pkg': 'package', 'url': 'ssh://host/path/package', 'dir': '/path/package', 'base': '', 'host': 'host', 'port': None, 'name': 'origin'}
- True
- >>> parse_remote("ssh://host:22/path/repo.git", "origin", "package") == {'pkg': 'package', 'url': 'ssh://host:22/path/repo.git', 'dir': '/path/repo.git', 'base': '', 'host': 'host', 'port': '22', 'name': 'origin'}
- True
- >>> parse_remote("ssh://host:22/~/path/%(pkg)s.git", "origin", "package") == {'pkg': 'package', 'url': 'ssh://host:22/~/path/package.git', 'dir': 'path/package.git', 'base': '~/', 'host': 'host', 'port': '22', 'name': 'origin'}
- True
- >>> parse_remote("ssh://host:22/~user/path/%(pkg)s.git", "origin", "package") == {'pkg': 'package', 'url': 'ssh://host:22/~user/path/package.git', 'dir': 'path/package.git', 'base': '~user/', 'host': 'host', 'port': '22', 'name': 'origin'}
- True
+ >>> parse_remote("ssh://host/path/%(pkg)s", "origin", "package")
+ {'name': 'origin', 'url': 'ssh://host/path/package', 'host': 'host', 'base': '', 'pkg': 'package', 'port': None, 'dir': '/path/package'}
+
+ >>> parse_remote("ssh://host:22/path/repo.git", "origin", "package")
+ {'name': 'origin', 'url': 'ssh://host:22/path/repo.git', 'host': 'host', 'base': '', 'pkg': 'package', 'port': '22', 'dir': '/path/repo.git'}
+
+ >>> parse_remote("ssh://host:22/~/path/%(pkg)s.git", "origin", "package")
+ {'name': 'origin', 'url': 'ssh://host:22/~/path/package.git', 'host': 'host', 'base': '~/', 'pkg': 'package', 'port': '22', 'dir': 'path/package.git'}
+
+ >>> parse_remote("ssh://host:22/~user/path/%(pkg)s.git", "origin", "package")
+ {'name': 'origin', 'url': 'ssh://host:22/~user/path/package.git', 'host': 'host', 'base': '~user/', 'pkg': 'package', 'port': '22', 'dir': 'path/package.git'}
+
>>> parse_remote("git://host/repo.git", "origin", "package")
Traceback (most recent call last):
...