Skip to content

Commit 23a73e9

Browse files
update license year and add test to ensure it stay updated
1 parent e6dcfbc commit 23a73e9

File tree

2 files changed

+15
-1
lines changed

2 files changed

+15
-1
lines changed

LICENSE.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Copyright (c) 2014-2024, the pyroSAR Developers.
1+
# Copyright (c) 2014-2025, the pyroSAR Developers.
22

33
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated
44
documentation files (the "Software"), to deal in the Software without restriction, including without limitation the

tests/test_license.py

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
import os
2+
import re
3+
from datetime import datetime
4+
5+
def test_license_year():
6+
dir_current = os.path.dirname(os.path.abspath(__file__))
7+
license = os.path.join(dir_current, '..', 'LICENSE.txt')
8+
assert os.path.isfile(license)
9+
with open(license, 'r') as f:
10+
content = f.read()
11+
start, end = re.search('([0-9]{4})-([0-9]{4})', content).groups()
12+
year_current = datetime.now().year
13+
assert int(start) == 2014
14+
assert int(end) == year_current

0 commit comments

Comments
 (0)