diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-03-22 13:47:44 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-04-17 15:45:51 +0200 |
commit | 5b63e3f2c780d1d235ee417344bc8ef50984578c (patch) | |
tree | f5c55e00321bc86379c84aa5e983bf4699bee210 | |
parent | 671046207e7475476758ef31b3e9063deb947a5a (diff) |
tests: add doctests for gbp.deb.orig_file()
-rw-r--r-- | gbp/deb.py | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -242,7 +242,14 @@ def parse_changelog(contents=None, filename=None): def orig_file(cp, compression): - "The name of the orig.tar.gz belonging to changelog cp" + """ + The name of the orig file belonging to changelog cp + + >>> orig_file({'Source': 'foo', 'Upstream-Version': '1.0'}, "bzip2") + 'foo_1.0.orig.tar.bz2' + >>> orig_file({'Source': 'bar', 'Upstream-Version': '0.0~git1234'}, "xz") + 'bar_0.0~git1234.orig.tar.xz' + """ ext = compressor_opts[compression][1] return "%s_%s.orig.tar.%s" % (cp['Source'], cp['Upstream-Version'], ext) |