~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/per_transport.py

  • Committer: Canonical.com Patch Queue Manager
  • Date: 2010-09-20 14:57:31 UTC
  • mfrom: (5434.1.2 trunk)
  • Revision ID: pqm@pqm.ubuntu.com-20100920145731-g0nb7fth1nrppoxf
(vila) Re-open bzr.dev for dev as 2.3.0dev2 (Vincent Ladeuil)

Show diffs side-by-side

added added

removed removed

Lines of Context:
26
26
from StringIO import StringIO as pyStringIO
27
27
import stat
28
28
import sys
 
29
import unittest
29
30
 
30
31
from bzrlib import (
31
32
    errors,
32
33
    osutils,
33
 
    pyutils,
34
34
    tests,
35
35
    urlutils,
36
36
    )
37
37
from bzrlib.errors import (ConnectionError,
 
38
                           DirectoryNotEmpty,
38
39
                           FileExists,
39
40
                           InvalidURL,
 
41
                           LockError,
40
42
                           NoSuchFile,
 
43
                           NotLocalUrl,
41
44
                           PathError,
42
45
                           TransportNotPossible,
43
46
                           )
44
47
from bzrlib.osutils import getcwd
45
48
from bzrlib.smart import medium
46
49
from bzrlib.tests import (
 
50
    TestCaseInTempDir,
47
51
    TestSkipped,
48
52
    TestNotApplicable,
49
53
    multiply_tests,
74
78
    for module in _get_transport_modules():
75
79
        try:
76
80
            permutations = get_transport_test_permutations(
77
 
                pyutils.get_named_object(module))
 
81
                reduce(getattr, (module).split('.')[1:], __import__(module)))
78
82
            for (klass, server_factory) in permutations:
79
83
                scenario = ('%s,%s' % (klass.__name__, server_factory.__name__),
80
84
                    {"transport_class":klass,
98
102
 
99
103
    def setUp(self):
100
104
        super(TransportTests, self).setUp()
101
 
        self.overrideEnv('BZR_NO_SMART_VFS', None)
 
105
        self._captureVar('BZR_NO_SMART_VFS', None)
102
106
 
103
107
    def check_transport_contents(self, content, transport, relpath):
104
108
        """Check that transport.get(relpath).read() == content."""