Skip to content

Commit

Permalink
Add tests to assure copyright text is the same (listed in 4 places)
Browse files Browse the repository at this point in the history
  • Loading branch information
Joseph Curtis committed Mar 31, 2021
1 parent b7f650c commit ca037fd
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions tests/metadata_test.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
"""Ensure the metadata is updated and valid."""
from utils import REPO_PATH
import becquerel as bq

COPYRIGHT = (REPO_PATH / "COPYRIGHT.txt").read_text().strip("\n")


def test_copyright_in_license():
license = (REPO_PATH / "LICENSE.txt").read_text()
copyright_in_license = (
license.split("*** Copyright Notice ***")[-1]
.split("*** License Agreement ***")[0]
.strip("\n")
)
assert COPYRIGHT == copyright_in_license


def test_copyright_in_readme():
readme = (REPO_PATH / "README.md").read_text().strip("\n")
assert readme.endswith(COPYRIGHT)


def test_copyright_in_metadata():
assert bq.__metadata__.__copyright__.strip("\n") == COPYRIGHT

0 comments on commit ca037fd

Please sign in to comment.