Comment 4 for bug 504102

Revision history for this message
Martin Pool (mbp) wrote :

It turns out that, depending on the test ordering, this is sometimes run with the bzrdir_format already having a _network_name set.

=== modified file 'bzrlib/tests/per_bzrdir/test_bzrdir.py'
--- bzrlib/tests/per_bzrdir/test_bzrdir.py 2009-11-18 17:10:41 +0000
+++ bzrlib/tests/per_bzrdir/test_bzrdir.py 2010-01-08 06:26:24 +0000
@@ -1176,6 +1176,13 @@
             # because the default open will not open them and
             # they may not be initializable.
             return
+ # for remote formats, there must be no prior assumption about the
+ # network name to use - it's possible that this may somehow have got
+ # in through an unisolated test though - see
+ # <https://bugs.edge.launchpad.net/bzr/+bug/504102>
+ self.assertEquals(getattr(self.bzrdir_format,
+ '_network_name', None),
+ None)
         # supported formats must be able to init and open
         t = get_transport(self.get_url())
         readonly_t = get_transport(self.get_readonly_url())