remove LocalAbspathServer, LocalRelpathServer
Martin Pool
mbp at canonical.com
Thu Aug 24 09:36:38 BST 2006
This is a small cleanup in response to previous review comments. We
discovered that running tests three times for local paths was a waste,
because the only difference is in how the transport is initialized.
With this change applied, we just directly test constructing transports
from paths, and then run the lower-level tests just once.
Since local path tests are pretty fast this only saves a few seconds
from the test suite time. More importantly it reduces duplication, and
lets us move more things towards get_url actually returning a URL,
rather than sometimes a url and sometimes a path.
This isn't intended for 0.10 but I'd like to hear if there's any reason
not to remove them or continue on that path.
--
Martin
-------------- next part --------------
# Bazaar revision bundle v0.8
#
# message:
# Actually remove Local{Abs,Rel}pathServer
# committer: Martin Pool <mbp at sourcefrog.net>
# date: Thu 2006-08-24 18:34:40.628999949 +1000
=== modified file bzrlib/transport/local.py
--- bzrlib/transport/local.py
+++ bzrlib/transport/local.py
@@ -344,22 +344,6 @@
return True
-class LocalRelpathServer(Server):
- """A pretend server for local transports, using relpaths."""
-
- def get_url(self):
- """See Transport.Server.get_url."""
- return "."
-
-
-class LocalAbspathServer(Server):
- """A pretend server for local transports, using absolute paths."""
-
- def get_url(self):
- """See Transport.Server.get_url."""
- return os.path.abspath("")
-
-
class LocalURLServer(Server):
"""A pretend server for local transports, using file:// urls.
# revision id: mbp at sourcefrog.net-20060824083440-e278138fb2bc383c
# sha1: 7cf87d86312fd39cd2b37f90c3abefc7302fce36
# inventory sha1: 1456512d6ceaf0debd97a2fe5e8230193d420af4
# parent ids:
# mbp at sourcefrog.net-20060824082026-d539b3b122dc2f2a
# base id: mbp at sourcefrog.net-20060824082026-d539b3b122dc2f2a
# properties:
# branch-nick: bzr.mbp.local-transport-tests
More information about the bazaar
mailing list