Skip to content

Commit

Permalink
verify that symlinks arg is properly passed
Browse files Browse the repository at this point in the history
  • Loading branch information
dennisvang committed Jun 11, 2024
1 parent 4d68041 commit d8d30db
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions tests/test_utils_platform_specific.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,12 @@
import textwrap
from time import sleep
import unittest
from unittest.mock import patch

from tests import BASE_DIR, TempDirTestCase
import tufup.utils.platform_specific as ps
from tufup.utils.platform_specific import (
ON_MAC,
ON_WINDOWS,
PLATFORM_SUPPORTED,
run_bat_as_admin,
Expand Down Expand Up @@ -91,6 +94,14 @@ def test_run_bat_as_admin(self):
self.assertTrue(len(output))
self.assertNotIn(current_user, output)

@unittest.skipIf(condition=not ON_MAC, reason='macOS only')
def test_install_update_macos_symlinks(self):
with patch.object(ps, '_install_update_mac') as mock_install_update_mac:
ps.install_update(src_dir='', dst_dir='')
mock_install_update_mac.assert_called_with(symlinks=False)
ps.install_update(src_dir='', dst_dir='', symlinks=True)
mock_install_update_mac.assert_called_with(symlinks=True)

@unittest.skipIf(
condition=not PLATFORM_SUPPORTED, reason=_reason_platform_not_supported
)
Expand Down

0 comments on commit d8d30db

Please sign in to comment.