Skip to content

Commit

Permalink
adding test for license copyright year
Browse files Browse the repository at this point in the history
  • Loading branch information
bandophahita committed Feb 16, 2024
1 parent 99b7bf3 commit b325bdc
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
2 changes: 1 addition & 1 deletion LICENSE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
MIT License

Copyright (c) 2022-2023 Perry Goy
Copyright (c) 2022-2024 Perry Goy

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
Expand Down
10 changes: 10 additions & 0 deletions tests/test__version__.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
from __future__ import annotations

from datetime import datetime
from pathlib import Path

from screenpy_pyotp import __version__

Expand All @@ -15,3 +16,12 @@ def test_copyright_year() -> None:
current = datetime.now().year

assert f"{current}" in __version__.__copyright__


def test_copyright_year_in_license() -> None:
current = datetime.now().year
license_path = Path(__file__).parent / ".." / "LICENSE"
with open(license_path) as fp:
license_text = fp.read()

assert f"{current}" in license_text

0 comments on commit b325bdc

Please sign in to comment.