def test_create_tarballs():
    """Create an upstream tarball"""
    # Tarball with submodules
    changelog = { "Source": "test", "Upstream-Version": "0.1" }
    ok_(buildpackage.git_archive(REPO, changelog, str(TMPDIR), "HEAD", "bzip2",
                                 "9", True))
    # Tarball without submodules
    changelog = { "Source": "test", "Upstream-Version": "0.2" }
    ok_(buildpackage.git_archive(REPO, changelog, str(TMPDIR), "HEAD", "bzip2",
                                 "9", False))
def test_create_tarballs():
    """Create an upstream tarball"""
    # Tarball with submodules
    changelog = { "Source": "test", "Upstream-Version": "0.1" }
    ok_(buildpackage.git_archive(REPO, changelog, str(TMPDIR), "HEAD", "bzip2",
                                 "9", True))
    # Tarball without submodules
    changelog = { "Source": "test", "Upstream-Version": "0.2" }
    ok_(buildpackage.git_archive(REPO, changelog, str(TMPDIR), "HEAD", "bzip2",
                                 "9", False))
Exemple #3
0
def test_create_tarballs():
    """Create an upstream tarball"""
    class source:
        def __init__(self, version):
            self.name = 'test'
            self.upstream_version = version

    # Tarball with submodules
    s = source('0.1')
    ok_(
        buildpackage.git_archive(REPO, s, str(TMPDIR), "HEAD", "bzip2", 9,
                                 True))
    # Tarball without submodules
    s = source('0.2')
    ok_(
        buildpackage.git_archive(REPO, s, str(TMPDIR), "HEAD", "bzip2", 9,
                                 False))
def test_create_tarball():
    """Create an upstream tarball"""
    cp = { "Source": "test", "Upstream-Version": "0.1" }
    assert buildpackage.git_archive(repo,
                                        cp,
                                        tmpdir,
                                        "HEAD",
                                        "bzip2",
                                        "9",
                                        True)