Rev 2484: test_transport must provide get_test_permutations in http://sourcefrog.net/bzr/run-hooks

Martin Pool mbp at sourcefrog.net
Fri May 4 11:41:33 BST 2007


At http://sourcefrog.net/bzr/run-hooks

------------------------------------------------------------
revno: 2484
revision-id: mbp at sourcefrog.net-20070504104131-9zq53xhbxtri3jl3
parent: mbp at sourcefrog.net-20070504101317-n1h3roy8lv7e06ng
committer: Martin Pool <mbp at sourcefrog.net>
branch nick: run-hooks
timestamp: Fri 2007-05-04 20:41:31 +1000
message:
  test_transport must provide get_test_permutations
modified:
  bzrlib/tests/test_transport.py testtransport.py-20050718175618-e5cdb99f4555ddce
  bzrlib/transport/__init__.py   transport.py-20050711165921-4978aa7ce1285ad5
=== modified file 'bzrlib/tests/test_transport.py'
--- a/bzrlib/tests/test_transport.py	2007-04-26 09:07:38 +0000
+++ b/bzrlib/tests/test_transport.py	2007-05-04 10:41:31 +0000
@@ -592,3 +592,13 @@
         # make sure we reach the root
         t = t.clone('..')
         self.assertEquals(t.base, 'file://HOST/')
+
+
+def get_test_permutations():
+    """Return transport permutations to be used in testing.
+
+    This module registers some transports, but they're only for testing
+    registration.  We don't really want to run all the transport tests against
+    them.
+    """
+    return []

=== modified file 'bzrlib/transport/__init__.py'
--- a/bzrlib/transport/__init__.py	2007-04-26 09:07:38 +0000
+++ b/bzrlib/transport/__init__.py	2007-05-04 10:41:31 +0000
@@ -1185,8 +1185,10 @@
     def get_transport_test_permutations(self, module):
         """Get the permutations module wants to have tested."""
         if getattr(module, 'get_test_permutations', None) is None:
-            warning("transport module %s doesn't provide get_test_permutations()"
+            raise AssertionError("transport module %s doesn't provide get_test_permutations()"
                     % module.__name__)
+            ##warning("transport module %s doesn't provide get_test_permutations()"
+            ##       % module.__name__)
             return []
         return module.get_test_permutations()
 




More information about the bazaar-commits mailing list