From 595569eeaba19bc090f40d07c6a2849df5e57bf8 Mon Sep 17 00:00:00 2001 From: Steven Robertson Date: Fri, 20 Mar 2020 21:32:16 -0700 Subject: [PATCH] don't run flaky test on python 2.6 --- tests/log_handler_test.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tests/log_handler_test.py b/tests/log_handler_test.py index e7c0cdba..a2e153ed 100644 --- a/tests/log_handler_test.py +++ b/tests/log_handler_test.py @@ -1,6 +1,7 @@ import logging import mock +import sys import unittest2 import testlib @@ -85,6 +86,11 @@ class StartupTest(testlib.RouterMixin, testlib.TestCase): expect = 'Parent is context %s (%s)' % (c1.context_id, 'parent') self.assertTrue(expect in logs) +StartupTest = unittest2.skipIf( + condition=sys.version_info < (2, 7), + reason="Message log flaky on Python < 2.7" +)(StartupTest) + if __name__ == '__main__': unittest2.main()