~ubuntu-branches/debian/sid/bzr-builddeb/sid

« back to all changes in this revision

Viewing changes to tests/test_tagging.py

  • Committer: Bazaar Package Importer
  • Author(s): Jelmer Vernooij, Colin Watson, Jelmer Vernooij, Robert Collins, James Westby
  • Date: 2010-08-11 18:23:54 UTC
  • Revision ID: james.westby@ubuntu.com-20100811182354-pgqznly5bbtoiso4
Tags: 2.5
[ Colin Watson ]
* Consider a .dsc without a Format: to be Format: 1.0.

[ Jelmer Vernooij ]
* export now uses the timestamp of the last revision, making them more
  deterministic, and so hopefully producing the same tarballs when it is
  used for that.
* Fix use of getattr to have 3 arguments to avoid exception. (LP: #572093)
* Implement the automatic_tag_name hook so that "bzr tag" with no arguments
  will tag based on the version in debian/changelog.
* Support upstream/VERSION tags, for compatibility with git-
  buildpackage. LP: #551362
* Support upstream tarballs without a pristine tar delta.
* Support -r argument to import-upstream.

[ Robert Collins ]
* Add import-upstream command which imports an upstream - useful for
  migrating existing packaging branches into pristine-tar using mode.
* Stop stripping .bzrignore from tarball imports. LP: #496907
* Make the upstream branch authoritative for file ids when importing a
  tarball, stopping errors when files are renamed. LP: #588060

[ James Westby ]
* Add a --package-merge option to builddeb to build with the -v and -sa
  appropriate when doing a merge from Debian or similar. LP: #576027
* Fixed a logic error that stops -r working in merge-upstream. LP: #594575

[ Jelmer Vernooij ]
* Determine Bazaar home directory using bzrlib to prevent test
  isolation issues. Closes: #614125
* Bump standards version to 3.9.1 (no changes).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
# Copyright (C) 2010 Canonical Limited
 
2
# vim: ts=4 sts=4 sw=4
 
3
#
 
4
# This file is part of bzr-builddeb.
 
5
#
 
6
# bzr-builddeb is free software; you can redistribute it and/or modify
 
7
# it under the terms of the GNU General Public License as published by
 
8
# the Free Software Foundation; either version 2 of the License, or
 
9
# (at your option) any later version.
 
10
#
 
11
# bzr-builddeb is distributed in the hope that it will be useful,
 
12
# but WITHOUT ANY WARRANTY; without even the implied warranty of
 
13
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
14
# GNU General Public License for more details.
 
15
#
 
16
# You should have received a copy of the GNU General Public License
 
17
# along with bzr-builddeb; if not, write to the Free Software
 
18
# Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301  USA
 
19
 
 
20
"""Tests for bzrlib.plugins.builddeb.tagging."""
 
21
 
 
22
from bzrlib.plugins.builddeb import tagging
 
23
from bzrlib.tests import (
 
24
    TestCase,
 
25
    )
 
26
 
 
27
 
 
28
class TestIsUpstreamTag(TestCase):
 
29
 
 
30
    def test_plain_version(self):
 
31
        self.assertFalse(tagging.is_upstream_tag('2.1'))
 
32
 
 
33
    def test_simple_upstream(self):
 
34
        self.assertTrue(tagging.is_upstream_tag('upstream-2.1'))
 
35
 
 
36
    def test_distro_upstream(self):
 
37
        self.assertTrue(tagging.is_upstream_tag('upstream-debian-2.1'))
 
38
 
 
39
    def test_git_upstream(self):
 
40
        self.assertTrue(tagging.is_upstream_tag('upstream/2.1'))
 
41
 
 
42
 
 
43
class TestUpstreamTagVersion(TestCase):
 
44
 
 
45
    def test_simple_upstream(self):
 
46
        self.assertEqual('2.1', tagging.upstream_tag_version('upstream-2.1'))
 
47
 
 
48
    def test_distro_upstream(self):
 
49
        self.assertEqual('2.1',
 
50
            tagging.upstream_tag_version('upstream-debian-2.1'))
 
51
 
 
52
    def test_git_upstream(self):
 
53
        self.assertEqual('2.1', tagging.upstream_tag_version('upstream/2.1'))