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

wahwah at users.sourceforge.net wahwah at users.sourceforge.net
Sun Jan 13 21:35:04 CET 2013


Revision: 20120
          http://gar.svn.sourceforge.net/gar/?rev=20120&view=rev
Author:   wahwah
Date:     2013-01-13 20:35:03 +0000 (Sun, 13 Jan 2013)
Log Message:
-----------
checkpkg: Import fixes for unit tests

Modified Paths:
--------------
    csw/mgar/gar/v2/lib/python/inspective_package_test.py
    csw/mgar/gar/v2/lib/python/system_pkgmap.py
    csw/mgar/gar/v2/lib/python/system_pkgmap_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-13 20:21:34 UTC (rev 20119)
+++ csw/mgar/gar/v2/lib/python/inspective_package_test.py	2013-01-13 20:35:03 UTC (rev 20120)
@@ -3,6 +3,7 @@
 import unittest2 as unittest
 import inspective_package
 import package
+import shell
 import mox
 import hachoir_parser
 import magic
@@ -139,11 +140,11 @@
     self.mox.StubOutWithMock(ip, 'ListBinaries')
     ip.ListBinaries().AndReturn([fake_binary])
 
-    self.mox.StubOutWithMock(inspective_package, 'ShellCommand')
+    self.mox.StubOutWithMock(shell, 'ShellCommand')
     args = [common_constants.ELFDUMP_BIN,
             '-svy',
             os.path.join(fake_package_path, "root", fake_binary)]
-    inspective_package.ShellCommand(args).AndReturn((0, fake_elfdump_output, ""))
+    shell.ShellCommand(args).AndReturn((0, fake_elfdump_output, ""))
     self.mox.ReplayAll()
 
     self.assertEqual(fake_binary_elfinfo, ip.GetBinaryElfInfo())
@@ -155,8 +156,8 @@
     self.mox.StubOutWithMock(os, 'uname')
     os.chmod('/tmp/CSWfake/root/bin/foo', 0755)
     ip.ListBinaries().AndReturn(['bin/foo'])
-    self.mox.StubOutWithMock(inspective_package, 'ShellCommand')
-    inspective_package.ShellCommand(
+    self.mox.StubOutWithMock(shell, 'ShellCommand')
+    shell.ShellCommand(
         ['ldd', '-Ur', '/tmp/CSWfake/root/bin/foo'],
         timeout=10).AndReturn((0, "", ""))
     self.mox.StubOutWithMock(ip, '_ParseLddDashRline')
@@ -171,8 +172,8 @@
     os.chmod('/tmp/CSWfake/root/bin/foo', 0755)
     os.uname().AndReturn('i86pc')
     ip.ListBinaries().AndReturn(['bin/foo'])
-    self.mox.StubOutWithMock(inspective_package, 'ShellCommand')
-    inspective_package.ShellCommand(
+    self.mox.StubOutWithMock(shell, 'ShellCommand')
+    shell.ShellCommand(
         ['ldd', '-Ur', '/tmp/CSWfake/root/bin/foo'],
         timeout=10).AndReturn((1, "", "boo"))
     self.mox.StubOutWithMock(ip, '_ParseLddDashRline')

Modified: csw/mgar/gar/v2/lib/python/system_pkgmap.py
===================================================================
--- csw/mgar/gar/v2/lib/python/system_pkgmap.py	2013-01-13 20:21:34 UTC (rev 20119)
+++ csw/mgar/gar/v2/lib/python/system_pkgmap.py	2013-01-13 20:35:03 UTC (rev 20120)
@@ -17,6 +17,7 @@
 import os.path
 import mute_progressbar
 import checkpkg_lib
+import shell
 import sys
 
 CONTENT_PKG_RE = r"^\*?(CSW|SUNW)[0-9a-zA-Z\-]?[0-9a-z\-]+$"

Modified: csw/mgar/gar/v2/lib/python/system_pkgmap_test.py
===================================================================
--- csw/mgar/gar/v2/lib/python/system_pkgmap_test.py	2013-01-13 20:21:34 UTC (rev 20119)
+++ csw/mgar/gar/v2/lib/python/system_pkgmap_test.py	2013-01-13 20:35:03 UTC (rev 20120)
@@ -1,6 +1,7 @@
 #!/usr/bin/env python2.6
 
 import unittest2 as unittest
+import shell
 import system_pkgmap
 import test_base
 import models

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