from tornado.concurrent import Future
from tornado.log import app_log
from tornado.testing import AsyncHTTPTestCase, AsyncTestCase, ExpectLog, gen_test
-from tornado.test.util import skipOnTravis, skipNotCPython
+from tornado.test.util import skipNotCPython
from tornado.web import Application, RequestHandler, HTTPError
from tornado import gen
self.io_loop.run_sync(f)
- @skipOnTravis
@gen_test
def test_multi_performance(self):
# Yielding a list used to have quadratic performance; make
from tornado.log import gen_log, app_log
from tornado import netutil
from tornado.testing import AsyncHTTPTestCase, bind_unused_port, gen_test, ExpectLog
-from tornado.test.util import skipOnTravis, ignore_deprecation
+from tornado.test.util import ignore_deprecation
from tornado.web import Application, RequestHandler, url
from tornado.httputil import format_timestamp, HTTPHeaders
self.assertEqual(response.code, 200)
self.assertEqual(response.body, body)
- @skipOnTravis
def test_hello_world(self):
response = self.fetch("/hello")
self.assertEqual(response.code, 200)
ExpectLog,
gen_test,
)
-from tornado.test.util import skipOnTravis, abstract_base_test
+from tornado.test.util import abstract_base_test
from tornado.web import Application, RequestHandler, stream_request_body
from contextlib import closing
self.assertIn(e.response.code, (431, 599))
-@skipOnTravis
class IdleTimeoutTest(AsyncHTTPTestCase):
def get_app(self):
return Application([("/", HelloWorldRequestHandler)])
from tornado.test.util import (
ignore_deprecation,
skipIfNonUnix,
- skipOnTravis,
)
from tornado.concurrent import Future
loop.start()
self.assertLess(self.calls, 10)
- @skipOnTravis
def test_add_callback_wakeup(self):
# Make sure that add_callback from inside a running IOLoop
# wakes up the IOLoop immediately instead of waiting for a timeout.
self.assertAlmostEqual(time.time(), self.start_time, places=2)
self.assertTrue(self.called)
- @skipOnTravis
def test_add_callback_wakeup_other_thread(self):
def target():
# sleep a bit to let the ioloop go into its poll loop
class TestPortAllocation(unittest.TestCase):
def test_same_port_allocation(self):
- if "TRAVIS" in os.environ:
- self.skipTest("dual-stack servers often have port conflicts on travis")
sockets = bind_sockets(0, "localhost")
try:
port = sockets[0].getsockname()[1]
)
from tornado.test.util import (
abstract_base_test,
- skipOnTravis,
skipIfNoIPv6,
refusing_port,
)
# request is the original request, is a POST still
self.assertEqual("POST", response.request.method)
- @skipOnTravis
@gen_test
def test_connect_timeout(self):
timeout = 0.1
cleanup_event.set()
yield gen.sleep(0.2)
- @skipOnTravis
def test_request_timeout(self):
timeout = 0.1
if os.name == "nt":
self.client = TCPClient()
def start_server(self, family):
- if family == socket.AF_UNSPEC and "TRAVIS" in os.environ:
- self.skipTest("dual-stack servers often have port conflicts on travis")
self.server = TestTCPServer(family)
return self.server.port
os.name != "posix" or sys.platform == "cygwin", "non-unix platform"
)
-# travis-ci.org runs our tests in an overworked virtual machine, which makes
-# timing-related tests unreliable.
-skipOnTravis = unittest.skipIf(
- "TRAVIS" in os.environ, "timing tests unreliable on travis"
-)
-
# Set the environment variable NO_NETWORK=1 to disable any tests that
# depend on an external network.
skipIfNoNetwork = unittest.skipIf("NO_NETWORK" in os.environ, "network access disabled")
Return value is (cleanup_func, port); the cleanup function
must be called to free the port to be reused.
"""
- # On travis-ci, port numbers are reassigned frequently. To avoid
+ # On travis-ci port numbers are reassigned frequently. To avoid
# collisions with other tests, we use an open client-side socket's
# ephemeral port number to ensure that nothing can listen on that
# port.