[Python-modules-commits] [python-macholib] 02/08: Skip tests that can only work on OSX

IOhannes m zmölnig umlaeute at moszumanska.debian.org
Mon Oct 26 22:15:08 UTC 2015


This is an automated email from the git hooks/post-receive script.

umlaeute pushed a commit to annotated tag debian/1.7_dfsg-3
in repository python-macholib.

commit 1d1739c749c07fa355a675b2c294879f268f70bf
Author: IOhannes m zmölnig <zmoelnig at umlautQ.umlaeute.mur.at>
Date:   Mon Oct 26 22:41:24 2015 +0100

    Skip tests that can only work on OSX
---
 macholib_tests/test_command_line.py | 2 ++
 macholib_tests/test_dyld.py         | 3 +++
 2 files changed, 5 insertions(+)

diff --git a/macholib_tests/test_command_line.py b/macholib_tests/test_command_line.py
index a9cfd6f..ad77de8 100644
--- a/macholib_tests/test_command_line.py
+++ b/macholib_tests/test_command_line.py
@@ -24,6 +24,7 @@ class TestCmdLine (unittest.TestCase):
         self.assertTrue(macho_dump.main is _cmdline.main)
         self.assertTrue(macho_find.main is _cmdline.main)
 
+    @unittest.skipUnless("darwin" == sys.platform, """'/bin/sh' is only a MachO-file on OSX""")
     def test_check_file(self):
         record = []
         def record_cb(fp, path):
@@ -115,6 +116,7 @@ class TestCmdLine (unittest.TestCase):
         macho_find.print_file(fp, "file2")
         self.assertEqual(fp.getvalue(), "file1\nfile2\n")
 
+    @unittest.skipUnless("darwin" == sys.platform, """'/bin/sh' is only a MachO-file on OSX""")
     def test_macho_dump(self):
         fp = StringIO()
         macho_dump.print_file(fp, "/bin/sh")
diff --git a/macholib_tests/test_dyld.py b/macholib_tests/test_dyld.py
index 7b41758..6ed6cc2 100644
--- a/macholib_tests/test_dyld.py
+++ b/macholib_tests/test_dyld.py
@@ -332,6 +332,7 @@ class TestDyld (unittest.TestCase):
                     '/network/lib/Python',
                 ])
 
+    @unittest.skipUnless("darwin" == sys.platform, """'/usr/lib/libSystem.dylib' only exists on OSX""")
     def test_dyld_find(self):
         result = dyld.dyld_find('/usr/lib/libSystem.dylib')
         self.assertEqual(result, '/usr/lib/libSystem.dylib')
@@ -387,6 +388,7 @@ class TestDyld (unittest.TestCase):
         finally:
             patcher.cleanup()
 
+    @unittest.skipUnless("darwin" == sys.platform, """'/System/Library/Framworks/Cocoa.framework' only exists on OSX""")
     def test_framework_find(self):
         result = dyld.framework_find('/System/Library/Frameworks/Cocoa.framework/Versions/Current/Cocoa')
         self.assertEqual(result, '/System/Library/Frameworks/Cocoa.framework/Versions/Current/Cocoa')
@@ -442,6 +444,7 @@ class TestDyld (unittest.TestCase):
 
 class TestTrivialDyld (unittest.TestCase):
     # Tests ported from the implementation file
+    @unittest.skipUnless("darwin" == sys.platform, """'libSystem.dylib'/'System.framework' only exist on OSX""")
     def testBasic(self):
         self.assertEqual(dyld.dyld_find('libSystem.dylib'), '/usr/lib/libSystem.dylib')
         self.assertEqual(dyld.dyld_find('System.framework/System'), '/System/Library/Frameworks/System.framework/System')

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/python-modules/packages/python-macholib.git



More information about the Python-modules-commits mailing list