~bzr-pqm/bzr/bzr.dev

« back to all changes in this revision

Viewing changes to bzrlib/tests/test_transport_implementations.py

  • Committer: Martin Pool
  • Date: 2007-04-04 01:22:11 UTC
  • mfrom: (2393.1.1 bzr.docs)
  • mto: This revision was merged to the branch mainline in revision 2397.
  • Revision ID: mbp@sourcefrog.net-20070404012211-sq269me6bai9m6xk
merge trunk and doc fix from elliot

Show diffs side-by-side

added added

removed removed

Lines of Context:
42
42
import bzrlib.transport
43
43
 
44
44
 
45
 
def _append(fn, txt):
46
 
    """Append the given text (file-like object) to the supplied filename."""
47
 
    f = open(fn, 'ab')
48
 
    try:
49
 
        f.write(txt.read())
50
 
    finally:
51
 
        f.close()
52
 
 
53
 
 
54
45
class TransportTests(TestTransportImplementation):
55
46
 
56
47
    def check_transport_contents(self, content, transport, relpath):
1314
1305
        """
1315
1306
        transport = self.get_transport()
1316
1307
        try:
1317
 
            medium = transport.get_smart_medium()
1318
 
            self.assertIsInstance(medium, smart.SmartClientMedium)
 
1308
            client_medium = transport.get_smart_medium()
 
1309
            self.assertIsInstance(client_medium, smart.SmartClientMedium)
1319
1310
        except errors.NoSmartMedium:
1320
1311
            # as long as we got it we're fine
1321
1312
            pass