diff options
author | Guido Günther <agx@sigxcpu.org> | 2011-03-19 18:18:42 +0100 |
---|---|---|
committer | Guido Günther <agx@sigxcpu.org> | 2011-03-19 18:18:42 +0100 |
commit | 0827a33b585a685135353ea93d7ba3ed7fe43bc5 (patch) | |
tree | 2770fdf013b44cc60a256e33ea8779e4d57bbb30 /tests | |
parent | dcc25625bea4546b4e0d904868dbe17d91d63432 (diff) |
tests: add testcase for git_archive()
Diffstat (limited to 'tests')
-rw-r--r-- | tests/04_test_gbp_submodules.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/tests/04_test_gbp_submodules.py b/tests/04_test_gbp_submodules.py index f24861a9..160e5b51 100644 --- a/tests/04_test_gbp_submodules.py +++ b/tests/04_test_gbp_submodules.py @@ -37,6 +37,7 @@ def setup(): os.chdir(repodir) + def teardown(): os.chdir(top) if not os.getenv("GBP_TESTS_NOCLEAN") and tmpdir: @@ -86,6 +87,7 @@ def test_get_submodules(): assert submodule[0] == './test_submodule' assert len(submodule[1]) == 40 + def test_dump_tree(): """Dump the repository and check if files exist""" dumpdir = os.path.join(tmpdir, "dump") @@ -95,4 +97,14 @@ def test_dump_tree(): assert os.path.exists(os.path.join(dumpdir, submodule_name, testfile_name)) +def test_create_tarball(): + """Create an upstream tarball""" + cp = { "Source": "test", "Upstream-Version": "0.1" } + assert git_buildpackage.git_archive(repo, + cp, + tmpdir, + "HEAD", + "bzip2", + "9") + # vim:et:ts=4:sw=4:et:sts=4:ai:set list listchars=tab\:»·,trail\:·: |