Rev 5236: (lifeless) Changes some tests that compare paths to use a fancier method in file:///home/pqm/archives/thelove/bzr/%2Btrunk/

Canonical.com Patch Queue Manager pqm at pqm.ubuntu.com
Mon May 17 07:11:19 BST 2010


At file:///home/pqm/archives/thelove/bzr/%2Btrunk/

------------------------------------------------------------
revno: 5236 [merge]
revision-id: pqm at pqm.ubuntu.com-20100517061117-ql322n4jeqh48w8f
parent: pqm at pqm.ubuntu.com-20100514160131-h02nbvcnwi2o80nw
parent: gzlist at googlemail.com-20100516134919-jrnlzbxvx3ey3u4l
committer: Canonical.com Patch Queue Manager <pqm at pqm.ubuntu.com>
branch nick: +trunk
timestamp: Mon 2010-05-17 07:11:17 +0100
message:
  (lifeless) Changes some tests that compare paths to use a fancier method
   than just string comparison, fixing them on Windows. (Martin [gz])
modified:
  bzrlib/tests/test_plugins.py   plugins.py-20050622075746-32002b55e5e943e9
=== modified file 'bzrlib/tests/test_plugins.py'
--- a/bzrlib/tests/test_plugins.py	2010-04-20 22:38:03 +0000
+++ b/bzrlib/tests/test_plugins.py	2010-05-16 13:49:19 +0000
@@ -842,8 +842,8 @@
         osutils.set_or_unset_env('BZR_PLUGINS_AT', 'test_foo at non-standard-dir')
         plugin.load_plugins(['standard'])
         self.assertTestFooLoadedFrom('non-standard-dir')
-        self.assertEqual('non-standard-dir/__init__.py',
-                         bzrlib.plugins.test_foo.__file__)
+        self.assertIsSameRealPath('non-standard-dir/__init__.py',
+                                  bzrlib.plugins.test_foo.__file__)
 
         # Try importing again now that the source has been compiled
         self._unregister_plugin('test_foo')
@@ -854,8 +854,8 @@
             suffix = 'pyc'
         else:
             suffix = 'pyo'
-        self.assertEqual('non-standard-dir/__init__.%s' % suffix,
-                         bzrlib.plugins.test_foo.__file__)
+        self.assertIsSameRealPath('non-standard-dir/__init__.%s' % suffix,
+                                  bzrlib.plugins.test_foo.__file__)
 
     def test_submodule_loading(self):
         # We create an additional directory under the one for test_foo
@@ -866,8 +866,8 @@
         self.assertEqual('bzrlib.plugins.test_foo',
                          bzrlib.plugins.test_foo.__package__)
         import bzrlib.plugins.test_foo.test_bar
-        self.assertEqual('non-standard-dir/test_bar/__init__.py',
-                         bzrlib.plugins.test_foo.test_bar.__file__)
+        self.assertIsSameRealPath('non-standard-dir/test_bar/__init__.py',
+                                  bzrlib.plugins.test_foo.test_bar.__file__)
 
     def test_loading_from___init__only(self):
         # We rename the existing __init__.py file to ensure that we don't load




More information about the bazaar-commits mailing list