Commits

Ronald Oussoren committed 159fd0b

Test tweaks

* Disable test when the tested function shouldn't be available

* Add dummy tests for functions that aren't tested yet

  • Participants
  • Parent commits 6361266

Comments (0)

Files changed (3)

 library on Mac OS X 10.4 or later. The ASL
 library is a low-level logging library, meant
 as a replacement for the syslog API.
+
+See the documentation (in doc/) for more
+information.

File asl_tests/test_client.py

 import unittest
 import sys
 import os
+import platform
 
 import asl
 
         msg.set_query(asl.ASL_KEY_FACILITY, "com.apple.console", asl.ASL_QUERY_OP_EQUAL)
         self.assertNotEqual(list(cli.search(msg)), [])
 
+    @unittest.skipUnless(platform.mac_ver()[0] >= "10.8", "Requires OSX 10.8")
     def test_redirection(self):
         cli = asl.aslclient("ident", "facility", 0)
         self.assertIsInstance(cli, asl.aslclient)
         msg[asl.ASL_KEY_FACILITY] = "com.apple.console"
         cli.log_descriptor(msg, asl.ASL_LEVEL_NOTICE, fd, asl.ASL_LOG_DESCRIPTOR_WRITE)
 
+    @unittest.skipUnless(platform.mac_ver()[0] >= "10.7", "Requires OSX 10.7")
     def test_open_from_file(self):
         try:
             fd = os.open("asl.log", os.O_RDWR|os.O_CREAT, 0o660)

File asl_tests/test_misc.py

         self.assertIs(asl.asl_new, asl.aslmsg)
         self.assertIs(asl.asl_open, asl.aslclient)
 
+    @unittest.skipUnless(platform.mac_ver()[0] >= "10.7", "Requires OSX 10.7")
+    def test_create_auxiliary_file(self):
+        self.fail()
+
+    @unittest.skipUnless(platform.mac_ver()[0] >= "10.7", "Requires OSX 10.7")
+    def test_log_auxiliary_location(self):
+        self.fail()
+
+
 if __name__ == "__main__":
     unittest.main()