[pypy-svn] r66639 - pypy/trunk/pypy/tool/test
pedronis at codespeak.net
pedronis at codespeak.net
Sun Jul 26 18:21:36 CEST 2009
Author: pedronis
Date: Sun Jul 26 18:21:35 2009
New Revision: 66639
Added:
pypy/trunk/pypy/tool/test/test_license.py (contents, props changed)
Log:
in the spirit of testing all which can be, test that the copyright year in the license is up to date
Added: pypy/trunk/pypy/tool/test/test_license.py
==============================================================================
--- (empty file)
+++ pypy/trunk/pypy/tool/test/test_license.py Sun Jul 26 18:21:35 2009
@@ -0,0 +1,13 @@
+import py, datetime
+
+def test_license():
+ lic = (py.path.local(__file__).dirpath().dirpath()
+ .dirpath().dirpath().join('LICENSE'))
+ text = lic.read()
+ COPYRIGHT_HOLDERS="PyPy Copyright holders 2003-"
+ assert COPYRIGHT_HOLDERS in text
+ pos = text.find(COPYRIGHT_HOLDERS)
+ year2 = text[pos+len(COPYRIGHT_HOLDERS):pos+len(COPYRIGHT_HOLDERS)+5]
+ copyright_year = int(year2)
+ cur_year = datetime.date.today().year
+ assert copyright_year == cur_year
More information about the Pypy-commit
mailing list