[PATCH 54/55] Implement TestCase.assertIn for older versions of Python.

Jelmer Vernooij jelmer at samba.org
Fri Feb 6 12:04:26 MST 2015


Change-Id: I17d855166b439c0bd9344a17a454ea5bc6e057aa
Signed-off-by: Jelmer Vernooij <jelmer at samba.org>
---
 python/samba/tests/__init__.py | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/python/samba/tests/__init__.py b/python/samba/tests/__init__.py
index 413ac69..840e5c3 100644
--- a/python/samba/tests/__init__.py
+++ b/python/samba/tests/__init__.py
@@ -61,6 +61,9 @@ class TestCase(unittest.TestCase):
         def skipTest(self, reason):
             raise SkipTest(reason)
 
+        def assertIn(self, member, container, msg=None):
+            self.assertTrue(member in container, msg)
+
         def assertIs(self, a, b):
             self.assertTrue(a is b)
 
-- 
2.1.4



More information about the samba-technical mailing list