[csw-devel] SF.net SVN: gar:[20149] csw/mgar/gar/v2/lib/python/inspective_package_test. py

chninkel at users.sourceforge.net chninkel at users.sourceforge.net
Wed Jan 16 20:17:56 CET 2013


Revision: 20149
          http://gar.svn.sourceforge.net/gar/?rev=20149&view=rev
Author:   chninkel
Date:     2013-01-16 19:17:52 +0000 (Wed, 16 Jan 2013)
Log Message:
-----------
gar/v2: ldd unit tests: GetBasedir removes the leading slash

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/inspective_package_test.py

Modified: csw/mgar/gar/v2/lib/python/inspective_package_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/inspective_package_test.py	2013-01-16 13:00:42 UTC (rev 20148)
+++ csw/mgar/gar/v2/lib/python/inspective_package_test.py	2013-01-16 19:17:52 UTC (rev 20149)
@@ -156,7 +156,7 @@
     self.mox.StubOutWithMock(ip, 'GetFilesDir')
     self.mox.StubOutWithMock(os, 'chmod')
     self.mox.StubOutWithMock(os, 'uname')
-    ip.GetBasedir().AndReturn('/')
+    ip.GetBasedir().AndReturn('')
     os.chmod('/tmp/CSWfake/root/opt/csw/bin/foo', 0755)
     ip.ListBinaries().AndReturn(['opt/csw/bin/foo'])
     ip.GetFilesDir().AndReturn('root')
@@ -166,7 +166,7 @@
         timeout=10).AndReturn((0, "", ""))
     self.mox.StubOutWithMock(ip, '_ParseLddDashRline')
     self.mox.ReplayAll()
-    self.assertEqual({'/opt/csw/bin/foo': []}, ip.GetLddMinusRlines())
+    self.assertEqual({'opt/csw/bin/foo': []}, ip.GetLddMinusRlines())
 
   def testGetLddMinusRlinesReloc(self):
     ip = inspective_package.InspectivePackage("/tmp/CSWfake")
@@ -175,7 +175,7 @@
     self.mox.StubOutWithMock(ip, 'GetFilesDir')
     self.mox.StubOutWithMock(os, 'chmod')
     self.mox.StubOutWithMock(os, 'uname')
-    ip.GetBasedir().AndReturn('/opt/csw')
+    ip.GetBasedir().AndReturn('opt/csw')
     os.chmod('/tmp/CSWfake/reloc/bin/foo', 0755)
     ip.ListBinaries().AndReturn(['bin/foo'])
     ip.GetFilesDir().AndReturn('reloc')
@@ -185,7 +185,7 @@
         timeout=10).AndReturn((0, "", ""))
     self.mox.StubOutWithMock(ip, '_ParseLddDashRline')
     self.mox.ReplayAll()
-    self.assertEqual({'/opt/csw/bin/foo': []}, ip.GetLddMinusRlines())
+    self.assertEqual({'opt/csw/bin/foo': []}, ip.GetLddMinusRlines())
 
   def testGetLddMinusRlinesThrows(self):
     ip = inspective_package.InspectivePackage("/tmp/CSWfake")

This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.



More information about the devel mailing list