Mercurial > hgsubversion
comparison tests/comprehensive/test_custom_layout.py @ 1367:5ddb35c31097
Merge with stable.
This includes the force-disabling of stupid mode on Subversion 1.9 and
later.
author | Augie Fackler <raf@durin42.com> |
---|---|
date | Thu, 31 Dec 2015 12:52:49 -0500 |
parents | 89997a5fc181 |
children |
comparison
equal
deleted
inserted
replaced
1362:a279eb7185d4 | 1367:5ddb35c31097 |
---|---|
12 except ImportError: | 12 except ImportError: |
13 sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) | 13 sys.path.insert(0, os.path.dirname(os.path.dirname(__file__))) |
14 import test_util | 14 import test_util |
15 | 15 |
16 from hgsubversion import wrappers | 16 from hgsubversion import wrappers |
17 from hgsubversion import svnwrap | |
17 | 18 |
18 | 19 |
19 def _do_case(self, name, stupid): | 20 def _do_case(self, name, stupid): |
20 subdir = test_util.subdir.get(name, '') | 21 subdir = test_util.subdir.get(name, '') |
21 config = { | 22 config = { |
53 attrs = {'_do_case': _do_case, | 54 attrs = {'_do_case': _do_case, |
54 } | 55 } |
55 for case in test_util.custom: | 56 for case in test_util.custom: |
56 name = 'test_' + case[:-len('.svndump')].replace('-', '_') | 57 name = 'test_' + case[:-len('.svndump')].replace('-', '_') |
57 attrs[name] = buildmethod(case, name, stupid=False) | 58 attrs[name] = buildmethod(case, name, stupid=False) |
58 name += '_stupid' | 59 if svnwrap.subversion_version < (1, 9, 0): |
59 attrs[name] = buildmethod(case, name, stupid=True) | 60 name += '_stupid' |
61 attrs[name] = buildmethod(case, name, stupid=True) | |
60 | 62 |
61 CustomPullTests = type('CustomPullTests', (test_util.TestBase,), attrs) | 63 CustomPullTests = type('CustomPullTests', (test_util.TestBase,), attrs) |