-
Notifications
You must be signed in to change notification settings - Fork 41
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Sanitize filenames * Run tests on Windows * Should fail on Windows? * Name conflict * Mock platform * only replace : on Windows * Get rid of useless line
- Loading branch information
1 parent
81baf18
commit 86ad1a2
Showing
7 changed files
with
110 additions
and
24 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
from unittest.mock import MagicMock, patch | ||
|
||
from darwin.utils import is_unix_like_os | ||
|
||
|
||
def describe_is_unix_like_os(): | ||
@patch("platform.system", return_value="Linux") | ||
def it_returns_true_on_linux(mock: MagicMock): | ||
assert is_unix_like_os() | ||
mock.assert_called_once() | ||
|
||
@patch("platform.system", return_value="Windows") | ||
def it_returns_false_on_windows(mock: MagicMock): | ||
assert not is_unix_like_os() | ||
mock.assert_called_once() | ||
|
||
@patch("platform.system", return_value="Darwin") | ||
def it_returns_true_on_mac_os(mock: MagicMock): | ||
assert is_unix_like_os() | ||
mock.assert_called_once() |