-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added initial test for attachments, #15
- Loading branch information
Showing
3 changed files
with
24 additions
and
0 deletions.
There are no files selected for viewing
Empty file.
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 @@ | ||
This is a sample attachment that will be added to a note during testing. |
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,23 @@ | ||
"""Utils for testing""" | ||
|
||
from __future__ import annotations | ||
|
||
import platform | ||
|
||
|
||
def get_macos_version() -> tuple[int, int, int]: | ||
# returns tuple of ints containing OS version | ||
# e.g. 10.13.6 = (10, 13, 6) | ||
version = platform.mac_ver()[0].split(".") | ||
if len(version) == 2: | ||
(ver, major) = version | ||
minor = "0" | ||
elif len(version) == 3: | ||
(ver, major, minor) = version | ||
else: | ||
raise ( | ||
ValueError( | ||
f"Could not parse version string: {platform.mac_ver()} {version}" | ||
) | ||
) | ||
return (int(ver), int(major), int(minor)) |