Test: Updated template with more resilient test from Taskserver
This commit is contained in:
@@ -29,6 +29,7 @@
|
|||||||
import sys
|
import sys
|
||||||
import os
|
import os
|
||||||
import unittest
|
import unittest
|
||||||
|
from datetime import datetime
|
||||||
# Ensure python finds the local simpletap module
|
# Ensure python finds the local simpletap module
|
||||||
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
sys.path.append(os.path.dirname(os.path.abspath(__file__)))
|
||||||
|
|
||||||
@@ -72,9 +73,8 @@ class TestBugNumber(TestCase):
|
|||||||
"""Copyright is current"""
|
"""Copyright is current"""
|
||||||
code, out, err = self.t("version")
|
code, out, err = self.t("version")
|
||||||
|
|
||||||
expected = "Copyright \(C\) \d{4} - %d" % (2010,)
|
expected = "Copyright \(C\) \d{4} - %d" % (datetime.now().year,)
|
||||||
self.assertRegexpMatches(out, expected)
|
self.assertRegexpMatches(out.decode("utf8"), expected)
|
||||||
self.assertNotRegexpMatches(out, "foo")
|
|
||||||
|
|
||||||
# TAP diagnostics on the bas
|
# TAP diagnostics on the bas
|
||||||
self.tap("Yay TAP diagnostics")
|
self.tap("Yay TAP diagnostics")
|
||||||
|
|||||||
Reference in New Issue
Block a user