'ExceptionBenchmark().call_wrapped(50)',
'ExceptionBenchmark().enter_exit(500)',
'ExceptionBenchmark().call_wrapped(500)',
- ]
+ ]
for cmd in cmds:
print(cmd)
subprocess.check_call(base_cmd + [cmd])
(r"/", MainHandler),
(r"/a/message/new", MessageNewHandler),
(r"/a/message/updates", MessageUpdatesHandler),
- ],
+ ],
cookie_secret="__TODO:_GENERATE_YOUR_OWN_RANDOM_VALUE_HERE__",
template_path=os.path.join(os.path.dirname(__file__), "templates"),
static_path=os.path.join(os.path.dirname(__file__), "static"),
xsrf_cookies=True,
debug=options.debug,
- )
+ )
app.listen(options.port)
tornado.ioloop.IOLoop.current().start()
chat = {
"id": str(uuid.uuid4()),
"body": parsed["body"],
- }
+ }
chat["html"] = tornado.escape.to_basestring(
self.render_string("message.html", message=chat))
"sphinx.ext.doctest",
"sphinx.ext.intersphinx",
"sphinx.ext.viewcode",
- ]
+]
primary_domain = 'py'
default_role = 'py:obj'
"tornado.platform.asyncio",
"tornado.platform.caresresolver",
"tornado.platform.twisted",
- ]
+]
# I wish this could go in a per-module file...
coverage_ignore_classes = [
# tornado.gen
"WebSocketProtocol",
"WebSocketProtocol13",
"WebSocketProtocol76",
- ]
+]
coverage_ignore_functions = [
# various modules
latex_documents = [
('index', 'tornado.tex', 'Tornado Documentation', 'The Tornado Authors', 'manual', False),
- ]
+]
intersphinx_mapping = {
'python': ('https://docs.python.org/3.6/', None),
- }
+}
on_rtd = os.environ.get('READTHEDOCS', None) == 'True'
'unspec': socket.AF_UNSPEC,
'inet': socket.AF_INET,
'inet6': socket.AF_INET6,
- }[options.family]
+ }[options.family]
for host in args:
print('Resolving %s' % host)
('/post', PostHandler),
('/chunked', ChunkedHandler),
('/cache/(.*)', CacheHandler),
- ]
+ ]
def get_app_kwargs(self):
return dict(static_path='.')
# For our small test responses the Content-Encoding header
# wipes out any gains from compression
rs.CONNEG_GZIP_BAD,
- ]
+ ]
def get_allowed_errors(self):
return []
# it doesn't seem likely to cause any problems as long as we're
# using the correct Vary header.
rs.VARY_ETAG_DOESNT_CHANGE,
- ]
+ ]
if __name__ == '__main__':
parse_command_line()
parse_command_line()
app = Application([
('/', EchoHandler),
- ])
+ ])
app.listen(options.port, address='127.0.0.1')
IOLoop.instance().start()
PYTHON_VERSIONS = [
(r'c:\python27\python.exe', 'http://www.python.org/ftp/python/2.7.3/python-2.7.3.msi'),
(r'c:\python36\python.exe', 'http://www.python.org/ftp/python/3.6.0/python-3.6.0.msi'),
- ]
+]
SCRIPTS_DIR = r'c:\python27\scripts'
EASY_INSTALL = os.path.join(SCRIPTS_DIR, 'easy_install.exe')
"templates/utf8.html",
"test.crt",
"test.key",
- ],
- },
+ ],
+ },
author="Facebook",
author_email="python-tornado@googlegroups.com",
url="http://www.tornadoweb.org/",
'Programming Language :: Python :: 3.6',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
- ],
+ ],
**kwargs
)
res = yield [
namespace["async_wrapper"](event1, event2),
namespace["async_wrapper"](event2, event1)
- ]
+ ]
self.assertEqual([event1, event2], res)
('foo_bar', 'foo_bar'),
('foo-bar', 'foo_bar'),
('foo_bar', 'foo-bar'),
- ]
+ ]
for a, b in tests:
with subTest(self, a=a, b=b):
options = OptionParser()