From: Naoki Kambe Date: Wed, 13 Feb 2013 06:26:33 +0000 (+0900) Subject: [master] suppress some failures in stats tests with Python 3.3 X-Git-Tag: bind10-1.1.0beta1-release~105 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=6409bf0fb2fcb3d60c664009be730f1a71fdac54;p=thirdparty%2Fkea.git [master] suppress some failures in stats tests with Python 3.3 This is an ad-hoc workaround for the failures in stats tests. It's okayed to be committed on jabber. Note that this workaround should be removed after a fundamental fix for stats tests (#1668) is done. An investigation task for the fix will be worked on #2689. For the details of the failures, see #2666 and http://git.bind10.isc.org/~tester/builder//BIND10-valgrind/20130212205704-CentOS5-x86_64-GCC/logs/unittests.out --- diff --git a/src/bin/stats/tests/b10-stats-httpd_test.py b/src/bin/stats/tests/b10-stats-httpd_test.py index 98689c8d11..961986ecbe 100644 --- a/src/bin/stats/tests/b10-stats-httpd_test.py +++ b/src/bin/stats/tests/b10-stats-httpd_test.py @@ -34,6 +34,7 @@ import http.client import xml.etree.ElementTree import random import urllib.parse +import sys # load this module for xml validation with xsd. For this test, an # installation of lxml is required in advance. See http://lxml.de/. try: @@ -250,6 +251,7 @@ class TestHttpHandler(unittest.TestCase): # reset the signal handler self.sig_handler.reset() + @unittest.skipIf(sys.version_info >= (3, 3), "Unsupported in Python 3.3 or higher") @unittest.skipUnless(xml_parser, "skipping the test using XMLParser") def test_do_GET(self): self.assertTrue(type(self.stats_httpd.httpd) is list) diff --git a/src/bin/stats/tests/b10-stats_test.py b/src/bin/stats/tests/b10-stats_test.py index 80bd3a6f62..b76e4d2efd 100644 --- a/src/bin/stats/tests/b10-stats_test.py +++ b/src/bin/stats/tests/b10-stats_test.py @@ -27,6 +27,7 @@ import threading import io import time import imp +import sys import stats import isc.log @@ -605,6 +606,7 @@ class TestStats(unittest.TestCase): self.assertEqual(self.stats.update_statistics_data( 'Foo', 'foo1', _test_exp6), ['unknown module name: Foo']) + @unittest.skipIf(sys.version_info >= (3, 3), "Unsupported in Python 3.3 or higher") def test_update_statistics_data_withmid(self): self.stats = stats.Stats() self.stats.do_polling() @@ -736,6 +738,7 @@ class TestStats(unittest.TestCase): isc.config.create_answer(0)) self.assertFalse(self.stats.running) + @unittest.skipIf(sys.version_info >= (3, 3), "Unsupported in Python 3.3 or higher") def test_command_show(self): # two auth instances invoked list_auth = [ self.base.auth.server, @@ -1143,6 +1146,7 @@ class TestStats(unittest.TestCase): isc.config.create_answer( 1, "module name is not specified")) + @unittest.skipIf(sys.version_info >= (3, 3), "Unsupported in Python 3.3 or higher") def test_polling(self): stats_server = ThreadingServerManager(MyStats) stat = stats_server.server