From f1cca7388ba9fbc35b018e4b33d70d48bc65cf3e Mon Sep 17 00:00:00 2001 From: Felix Yan Date: Wed, 4 Nov 2015 21:25:01 +0800 Subject: [PATCH] Move global IOLoop hack to helper --- tests/helper.py | 6 +++++- tests/test_cmd.py | 4 ---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/helper.py b/tests/helper.py index 4daaf92..9f0358f 100644 --- a/tests/helper.py +++ b/tests/helper.py @@ -1,8 +1,12 @@ -from nvchecker.get_version import get_version +from tornado.ioloop import IOLoop import tornado.testing +from nvchecker.get_version import get_version class ExternalVersionTestCase(tornado.testing.AsyncTestCase): + def get_new_ioloop(self): + return IOLoop.instance() + def sync_get_version(self, name, config): def get_version_callback(name, version): self.stop(version) diff --git a/tests/test_cmd.py b/tests/test_cmd.py index 053364f..fb40f4d 100644 --- a/tests/test_cmd.py +++ b/tests/test_cmd.py @@ -1,10 +1,6 @@ -from tornado.ioloop import IOLoop from tests.helper import ExternalVersionTestCase class CMDTest(ExternalVersionTestCase): - def get_new_ioloop(self): - return IOLoop.instance() - def test_cmd(self): self.assertEqual(self.sync_get_version("example", {"cmd": "echo Meow"}), "Meow")