Skip to content

Commit 94b3cd1

Browse files
committed
Attempt to provide a test that works on macOS 11+
1 parent 1c196e4 commit 94b3cd1

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

launchd/tests/plist.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,24 +38,24 @@ def test_compute_filename(self):
3838
self.assertTrue(fname.startswith("/System/Library/LaunchDaemons/"))
3939

4040
@unittest.skipUnless(sys.platform.startswith("darwin"), "requires OS X")
41-
@unittest.skipIf(sys.version_info >= (3, 11), "com.apple.kextd was removed in macOS v11")
4241
def test_discover_filename(self):
43-
fname = plist.discover_filename("com.apple.kextd", plist.DAEMON_OS)
42+
sample_label = "com.apple.configd"
43+
fname = plist.discover_filename(sample_label, plist.DAEMON_OS)
4444
self.assertIsNotNone(fname)
4545
self.assertTrue(os.path.isfile(fname))
4646

4747
# no scope specified
48-
fname2 = plist.discover_filename("com.apple.kextd")
48+
fname2 = plist.discover_filename(sample_label)
4949
self.assertIsNotNone(fname)
5050
self.assertTrue(os.path.isfile(fname2))
5151

52-
fname = plist.discover_filename("com.apple.kextd", plist.USER)
52+
fname = plist.discover_filename(sample_label, plist.USER)
5353
self.assertIsNone(fname)
5454

5555
@unittest.skipUnless(sys.platform.startswith("darwin"), "requires OS X")
56-
@unittest.skipIf(sys.version_info >= (3, 11), "com.apple.kextd was removed in macOS v11")
5756
def test_read(self):
58-
result = plist.read("com.apple.kextd", plist.DAEMON_OS)
57+
sample_label = "com.apple.configd"
58+
result = plist.read(sample_label, plist.DAEMON_OS)
5959
self.assertIsInstance(result, dict)
6060

6161

0 commit comments

Comments
 (0)