~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_read_bundle.py

  • Committer: Andrew Bennetts
  • Date: 2010-10-08 04:25:10 UTC
  • mto: This revision was merged to the branch mainline in revision 5472.
  • Revision ID: andrew.bennetts@canonical.com-20101008042510-sg9vdhmnggilzxsk
Fix stray TAB in source.

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006-2011 Canonical Ltd
 
1
# Copyright (C) 2006 Canonical Ltd
2
2
#
3
3
# This program is free software; you can redistribute it and/or modify
4
4
# it under the terms of the GNU General Public License as published by
17
17
"""Test read_bundle works properly across various transports."""
18
18
 
19
19
import cStringIO
 
20
import os
20
21
 
21
22
import bzrlib.bundle
22
23
from bzrlib.bundle.serializer import write_bundle
23
24
import bzrlib.bzrdir
24
25
import bzrlib.errors as errors
 
26
from bzrlib.symbol_versioning import deprecated_in
25
27
from bzrlib import tests
26
28
from bzrlib.tests.test_transport import TestTransportImplementation
27
29
from bzrlib.tests.per_transport import transport_test_permutations
28
30
import bzrlib.transport
 
31
from bzrlib.transport.memory import MemoryTransport
29
32
import bzrlib.urlutils
30
 
from bzrlib.tests.scenarios import load_tests_apply_scenarios
31
 
 
32
 
 
33
 
load_tests = load_tests_apply_scenarios
 
33
 
 
34
 
 
35
def load_tests(standard_tests, module, loader):
 
36
    """Multiply tests for tranport implementations."""
 
37
    transport_tests, remaining_tests = tests.split_suite_by_condition(
 
38
        standard_tests,
 
39
        tests.condition_isinstance(TestReadMergeableBundleFromURL))
 
40
    return tests.multiply_tests(transport_tests, transport_test_permutations(),
 
41
        remaining_tests)
34
42
 
35
43
 
36
44
def create_bundle_file(test_case):
56
64
class TestReadMergeableBundleFromURL(TestTransportImplementation):
57
65
    """Test that read_bundle works properly across multiple transports"""
58
66
 
59
 
    scenarios = transport_test_permutations()
60
 
 
61
67
    def setUp(self):
62
68
        super(TestReadMergeableBundleFromURL, self).setUp()
63
69
        self.bundle_name = 'test_bundle'
66
72
        # from the one we want to test, so we must inject a correct transport
67
73
        # into possible_transports first).
68
74
        self.possible_transports = [self.get_transport(self.bundle_name)]
69
 
        self.overrideEnv('BZR_NO_SMART_VFS', None)
 
75
        self._captureVar('BZR_NO_SMART_VFS', None)
70
76
        wt = self.create_test_bundle()
71
77
 
72
78
    def read_mergeable_from_url(self, url):