Mercurial > hgsubversion
diff tests/comprehensive/test_stupid_pull.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 |
line wrap: on
line diff
--- a/tests/comprehensive/test_stupid_pull.py +++ b/tests/comprehensive/test_stupid_pull.py @@ -14,6 +14,7 @@ except ImportError: import test_util from hgsubversion import wrappers +from hgsubversion import svnwrap def _do_case(self, name, layout): @@ -48,18 +49,20 @@ def buildmethod(case, name, layout): m.__doc__ = 'Test stupid produces same as real on %s. (%s)' % (case, layout) return m -attrs = {'_do_case': _do_case, - } -for case in (f for f in os.listdir(test_util.FIXTURES) if f.endswith('.svndump')): - if case == 'corrupt.svndump': - continue - name = 'test_' + case[:-len('.svndump')].replace('-', '_') - # Automatic layout branchtag collision exposes a minor defect - # here, but since it isn't a regression we suppress the test case. - if case != 'branchtagcollision.svndump': - attrs[name] = buildmethod(case, name, 'auto') - attrs[name + '_single'] = buildmethod(case, name + '_single', 'single') - if case in test_util.custom: - attrs[name + '_custom'] = buildmethod(case, name + '_custom', 'custom') +if svnwrap.subversion_version < (1, 9, 0): + attrs = {'_do_case': _do_case, + } + for case in (f for f in os.listdir(test_util.FIXTURES) + if f.endswith('.svndump')): + if case == 'corrupt.svndump': + continue + name = 'test_' + case[:-len('.svndump')].replace('-', '_') + # Automatic layout branchtag collision exposes a minor defect + # here, but since it isn't a regression we suppress the test case. + if case != 'branchtagcollision.svndump': + attrs[name] = buildmethod(case, name, 'auto') + attrs[name + '_single'] = buildmethod(case, name + '_single', 'single') + if case in test_util.custom: + attrs[name + '_custom'] = buildmethod(case, name + '_custom', 'custom') -StupidPullTests = type('StupidPullTests', (test_util.TestBase,), attrs) + StupidPullTests = type('StupidPullTests', (test_util.TestBase,), attrs)