Patchwork [1,of,4,py3] tests: drop assertIn polyfill now that we're 2.7-only

login
register
mail settings
Submitter Augie Fackler
Date May 29, 2017, 1:43 a.m.
Message ID <a6e3817ee02bbcc2480a.1496022182@imladris.local>
Download mbox | patch
Permalink /patch/21025/
State Accepted
Headers show

Comments

Augie Fackler - May 29, 2017, 1:43 a.m.
# HG changeset patch
# User Augie Fackler <raf@durin42.com>
# Date 1496009294 14400
#      Sun May 28 18:08:14 2017 -0400
# Node ID a6e3817ee02bbcc2480a233ceb161586348b211a
# Parent  2ba4d3b74ba8360e97cbae25cb4584283dac4eb9
tests: drop assertIn polyfill now that we're 2.7-only

Patch

diff --git a/tests/test-manifest.py b/tests/test-manifest.py
--- a/tests/test-manifest.py
+++ b/tests/test-manifest.py
@@ -102,15 +102,6 @@  class basemanifesttests(object):
     def parsemanifest(self, text):
         raise NotImplementedError('parsemanifest not implemented by test case')
 
-    def assertIn(self, thing, container, msg=None):
-        # assertIn new in 2.7, use it if available, otherwise polyfill
-        sup = getattr(unittest.TestCase, 'assertIn', False)
-        if sup:
-            return sup(self, thing, container, msg=msg)
-        if not msg:
-            msg = 'Expected %r in %r' % (thing, container)
-        self.assert_(thing in container, msg)
-
     def testEmptyManifest(self):
         m = self.parsemanifest(EMTPY_MANIFEST)
         self.assertEqual(0, len(m))