Remove Python 2.4 deprecation warning special-casing.
authorDaniel Watkins <daniel@daniel-watkins.co.uk>
Tue, 3 Dec 2013 16:19:32 +0000 (16:19 +0000)
committerDaniel Watkins <daniel@daniel-watkins.co.uk>
Tue, 3 Dec 2013 16:35:28 +0000 (16:35 +0000)
testtools/tests/test_testresult.py

index d6b9048db38b489f4173dcbd219bd8154eca5c0e..a0a8aa36944f34e0afe165d95bf61cbed02b2175 100644 (file)
@@ -2381,11 +2381,6 @@ class TestNonAsciiResults(TestCase):
         self._run(stream, module.Test())
         return stream.getvalue()
 
-    def _silence_deprecation_warnings(self):
-        """Shut up DeprecationWarning for this test only"""
-        warnings.simplefilter("ignore", DeprecationWarning)
-        self.addCleanup(warnings.filters.remove, warnings.filters[0])
-
     def _get_sample_text(self, encoding="unicode_internal"):
         if encoding is None and str_is_unicode:
            encoding = "unicode_internal"
@@ -2520,9 +2515,6 @@ class TestNonAsciiResults(TestCase):
 
     def test_syntax_error_import_binary(self):
         """Importing a binary file shouldn't break SyntaxError formatting"""
-        if sys.version_info < (2, 5):
-            # Python 2.4 assumes the file is latin-1 and tells you off
-            self._silence_deprecation_warnings()
         self._setup_external_case("import bad")
         f = open(os.path.join(self.dir, "bad.py"), "wb")
         try: