bzr branch
http://gegoxaren.bato24.eu/bzr/brz/remove-bazaar
0.358.2
by Jelmer Vernooij
Refresh copyright headers, add my email. |
1 |
# Copyright (C) 2010-2018 Jelmer Vernooij <jelmer@jelmer.uk>
|
0.200.813
by Jelmer Vernooij
Add tests for revspec. |
2 |
#
|
3 |
# This program is free software; you can redistribute it and/or modify
|
|
4 |
# it under the terms of the GNU General Public License as published by
|
|
5 |
# the Free Software Foundation; either version 2 of the License, or
|
|
6 |
# (at your option) any later version.
|
|
7 |
#
|
|
8 |
# This program is distributed in the hope that it will be useful,
|
|
9 |
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
10 |
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
11 |
# GNU General Public License for more details.
|
|
12 |
#
|
|
13 |
# You should have received a copy of the GNU General Public License
|
|
14 |
# along with this program; if not, write to the Free Software
|
|
0.358.1
by Jelmer Vernooij
Fix FSF address. |
15 |
# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
|
0.200.813
by Jelmer Vernooij
Add tests for revspec. |
16 |
|
17 |
"""Test the git revision specifiers."""
|
|
18 |
||
6986.2.1
by Jelmer Vernooij
Move breezy.plugins.git to breezy.git. |
19 |
from ...tests import TestCase |
0.200.813
by Jelmer Vernooij
Add tests for revspec. |
20 |
|
0.200.1642
by Jelmer Vernooij
Use relative imports in tests. |
21 |
from ..revspec import ( |
0.200.813
by Jelmer Vernooij
Add tests for revspec. |
22 |
valid_git_sha1, |
23 |
)
|
|
24 |
||
7143.15.2
by Jelmer Vernooij
Run autopep8. |
25 |
|
0.200.813
by Jelmer Vernooij
Add tests for revspec. |
26 |
class Sha1ValidTests(TestCase): |
27 |
||
28 |
def test_invalid(self): |
|
6964.2.1
by Jelmer Vernooij
Initial work to support brz-git on python3. |
29 |
self.assertFalse(valid_git_sha1(b"git-v1:abcde")) |
0.200.813
by Jelmer Vernooij
Add tests for revspec. |
30 |
|
31 |
def test_valid(self): |
|
6964.2.1
by Jelmer Vernooij
Initial work to support brz-git on python3. |
32 |
self.assertTrue(valid_git_sha1(b"aabbccddee")) |
7265.2.1
by Jelmer Vernooij
Don't require that short git shas have an even number of characters. |
33 |
self.assertTrue(valid_git_sha1(b"aabbccd")) |