CPython 2.7과 함께 토네이도 4.4를 사용하고 있습니다.토네이도 hello_world 테스트 결과 599
http://www.tornadoweb.org/en/stable/guide/structure.html에서import tornado.ioloop
import tornado.web
class MainHandler(tornado.web.RequestHandler):
def get(self):
self.write("Hello, world")
def make_app():
return tornado.web.Application([
(r"/", MainHandler),
])
if __name__ == "__main__":
app = make_app()
app.listen(8888)
tornado.ioloop.IOLoop.current().start()
는 hello.py로하고 :
나는 복사 http://www.tornadoweb.org/en/stable/testing.html에서
import hello
class TestHelloApp(AsyncHTTPTestCase):
def get_app(self):
return hello.make_app()
def test_homepage(self):
response = self.fetch('/')
self.assertEqual(response.code, 200)
self.assertEqual(response.body, 'Hello, world')
이
을 test_hello.py을 그리고 실행하면
python -m tornado.test.runtests test_hello
나는 받고있다 :
AssertionError: 599 != 200
.
내가 누락되었거나 토네이도 워드 프로세서/코드를 업데이트해야합니다.
제 잘못, 지적 해 주셔서 고맙습니다. 나는 아직도 그것을 얻고있다 599. – pdx9