~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_read_bundle.py

  • Committer: Patch Queue Manager
  • Date: 2016-04-21 04:10:52 UTC
  • mfrom: (6616.1.1 fix-en-user-guide)
  • Revision ID: pqm@pqm.ubuntu.com-20160421041052-clcye7ns1qcl2n7w
(richard-wilbur) Ensure build of English use guide always uses English text
 even when user's locale specifies a different language. (Jelmer Vernooij)

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2006 Canonical Ltd
 
1
# Copyright (C) 2006-2011 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
21
20
 
22
21
import bzrlib.bundle
23
22
from bzrlib.bundle.serializer import write_bundle
24
23
import bzrlib.bzrdir
25
24
import bzrlib.errors as errors
26
 
from bzrlib.symbol_versioning import deprecated_in
27
25
from bzrlib import tests
28
26
from bzrlib.tests.test_transport import TestTransportImplementation
29
27
from bzrlib.tests.per_transport import transport_test_permutations
30
28
import bzrlib.transport
31
 
from bzrlib.transport.memory import MemoryTransport
32
29
import bzrlib.urlutils
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)
 
30
from bzrlib.tests.scenarios import load_tests_apply_scenarios
 
31
 
 
32
 
 
33
load_tests = load_tests_apply_scenarios
42
34
 
43
35
 
44
36
def create_bundle_file(test_case):
64
56
class TestReadMergeableBundleFromURL(TestTransportImplementation):
65
57
    """Test that read_bundle works properly across multiple transports"""
66
58
 
 
59
    scenarios = transport_test_permutations()
 
60
 
67
61
    def setUp(self):
68
62
        super(TestReadMergeableBundleFromURL, self).setUp()
69
63
        self.bundle_name = 'test_bundle'
72
66
        # from the one we want to test, so we must inject a correct transport
73
67
        # into possible_transports first).
74
68
        self.possible_transports = [self.get_transport(self.bundle_name)]
75
 
        self._captureVar('BZR_NO_SMART_VFS', None)
 
69
        self.overrideEnv('BZR_NO_SMART_VFS', None)
76
70
        wt = self.create_test_bundle()
77
71
 
78
72
    def read_mergeable_from_url(self, url):