Test: Updated template with more resilient test from Taskserver

This commit is contained in:
Paul Beckingham 2015-11-08 17:04:45 -05:00
parent 1407e0410e
commit f15e93ccc8

View file

@ -29,6 +29,7 @@
import sys
import os
import unittest
from datetime import datetime
# Ensure python finds the local simpletap module
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
@ -72,9 +73,8 @@ class TestBugNumber(TestCase):
"""Copyright is current"""
code, out, err = self.t("version")
expected = "Copyright \(C\) \d{4} - %d" % (2010,)
self.assertRegexpMatches(out, expected)
self.assertNotRegexpMatches(out, "foo")
expected = "Copyright \(C\) \d{4} - %d" % (datetime.now().year,)
self.assertRegexpMatches(out.decode("utf8"), expected)
# TAP diagnostics on the bas
self.tap("Yay TAP diagnostics")