Skip to content

Commit

Permalink
Added initial test for attachments, #15
Browse files Browse the repository at this point in the history
  • Loading branch information
RhetTbull committed Jan 4, 2023
1 parent 9079267 commit 4ca3781
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
Empty file added tests/__init__.py
Empty file.
1 change: 1 addition & 0 deletions tests/attachment.txt
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.
23 changes: 23 additions & 0 deletions tests/utils.py
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))

0 comments on commit 4ca3781

Please sign in to comment.