From ab25e33d495446027d0f2e2b5f697835f59019cd Mon Sep 17 00:00:00 2001 From: Marcel Wilson Date: Fri, 16 Feb 2024 11:04:31 -0600 Subject: [PATCH] adding license copyright test --- tests/test__version__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/tests/test__version__.py b/tests/test__version__.py index 7d9ea92..c6358c0 100644 --- a/tests/test__version__.py +++ b/tests/test__version__.py @@ -1,6 +1,7 @@ from __future__ import annotations from datetime import datetime +from pathlib import Path from screenpy_selenium import __version__ @@ -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