util.py
Go to the documentation of this file.
00001 from __future__ import absolute_import, division, print_function, with_statement
00002 
00003 import os
00004 import socket
00005 import sys
00006 
00007 # Encapsulate the choice of unittest or unittest2 here.
00008 # To be used as 'from tornado.test.util import unittest'.
00009 if sys.version_info < (2, 7):
00010     # In py26, we must always use unittest2.
00011     import unittest2 as unittest
00012 else:
00013     # Otherwise, use whichever version of unittest was imported in
00014     # tornado.testing.
00015     from tornado.testing import unittest
00016 
00017 skipIfNonUnix = unittest.skipIf(os.name != 'posix' or sys.platform == 'cygwin',
00018                                 "non-unix platform")
00019 
00020 # travis-ci.org runs our tests in an overworked virtual machine, which makes
00021 # timing-related tests unreliable.
00022 skipOnTravis = unittest.skipIf('TRAVIS' in os.environ,
00023                                'timing tests unreliable on travis')
00024 
00025 # Set the environment variable NO_NETWORK=1 to disable any tests that
00026 # depend on an external network.
00027 skipIfNoNetwork = unittest.skipIf('NO_NETWORK' in os.environ,
00028                                   'network access disabled')
00029 
00030 skipIfNoIPv6 = unittest.skipIf(not socket.has_ipv6, 'ipv6 support not present')


rosbridge_tools
Author(s): Jonathan Mace
autogenerated on Sat Dec 27 2014 11:25:59