subunit: Update to newer upstream version.
[samba.git] / lib / subunit / python / testtools / tests / test_matchers.py
index d5fd8bab3b5843a604faabbcfb169e4cbd3489ff..74b1ebc56ac47b62e1826bf4f60f6ad1ebd8e82a 100644 (file)
@@ -9,6 +9,7 @@ from testtools import (
     TestCase,
     )
 from testtools.matchers import (
+    Annotate,
     Equals,
     DocTestMatches,
     MatchesAny,
@@ -153,6 +154,18 @@ class TestMatchesAllInterface(TestCase, TestMatchersInterface):
                           1, MatchesAll(NotEquals(1), NotEquals(2)))]
 
 
+class TestAnnotate(TestCase, TestMatchersInterface):
+
+    matches_matcher = Annotate("foo", Equals(1))
+    matches_matches = [1]
+    matches_mismatches = [2]
+
+    str_examples = [
+        ("Annotate('foo', Equals(1))", Annotate("foo", Equals(1)))]
+
+    describe_examples = [("1 != 2: foo", 2, Annotate('foo', Equals(1)))]
+
+
 def test_suite():
     from unittest import TestLoader
     return TestLoader().loadTestsFromName(__name__)