]> review.fuel-infra Code Review - openstack-build/heat-build.git/commitdiff
Remove all references to nose
authorClint Byrum <clint@fewbar.com>
Wed, 1 May 2013 17:33:30 +0000 (10:33 -0700)
committerClint Byrum <clint@fewbar.com>
Wed, 1 May 2013 17:33:30 +0000 (10:33 -0700)
Now that testtools and testr have replaced nose, trims all references
and removes nose from test-requires.

Change-Id: I0aae8fe2c09c5b25741226555838dc330d5c4d91

heat/tests/test_scheduler.py
heat/tests/utils.py
heat/tests/v1_1/utils.py [deleted file]
setup.cfg
tools/test-requires

index ad75b6e2f538d05c851b5aafdc4a5033eed8a541..8b72aa2aca39543343495d2c91ae02c9cef02021 100644 (file)
@@ -13,7 +13,6 @@
 #    under the License.
 
 import mox
-from nose.plugins.attrib import attr
 
 import eventlet
 
@@ -33,8 +32,6 @@ class DummyTask(object):
         print self, step_num
 
 
-@attr(tag=['unit', 'scheduler'])
-@attr(speed='fast')
 class TaskTest(mox.MoxTestBase):
 
     def test_run(self):
index 19bd94f260b9bb9bad182f103b72a99c762611b3..fed91f67d0f0a51821f77ef3f1ca250560aebfa3 100644 (file)
@@ -13,7 +13,8 @@
 #    under the License.
 
 
-import nose.plugins.skip as skip
+from testtools import skipIf
+
 from heat.db.sqlalchemy.session import get_engine
 from heat.db import migration
 
@@ -27,8 +28,7 @@ class skip_if(object):
     def __call__(self, func):
         def _skipper(*args, **kw):
             """Wrapped skipper function."""
-            if self.condition:
-                raise skip.SkipTest(self.message)
+            skipIf(self.condition, self.message)
             func(*args, **kw)
         _skipper.__name__ = func.__name__
         _skipper.__doc__ = func.__doc__
diff --git a/heat/tests/v1_1/utils.py b/heat/tests/v1_1/utils.py
deleted file mode 100644 (file)
index f878a5e..0000000
+++ /dev/null
@@ -1,29 +0,0 @@
-from nose.tools import ok_
-
-
-def fail(msg):
-    raise AssertionError(msg)
-
-
-def assert_in(thing, seq, msg=None):
-    msg = msg or "'%s' not found in %s" % (thing, seq)
-    ok_(thing in seq, msg)
-
-
-def assert_not_in(thing, seq, msg=None):
-    msg = msg or "unexpected '%s' found in %s" % (thing, seq)
-    ok_(thing not in seq, msg)
-
-
-def assert_has_keys(dict, required=[], optional=[]):
-    keys = dict.keys()
-    for k in required:
-        assert_in(k, keys, "required key %s missing from %s" % (k, dict))
-    allowed_keys = set(required) | set(optional)
-    extra_keys = set(keys).difference(set(required + optional))
-    if extra_keys:
-        fail("found unexpected keys: %s" % list(extra_keys))
-
-
-def assert_isinstance(thing, kls):
-    ok_(isinstance(thing, kls), "%s is not an instance of %s" % (thing, kls))
index 58387f930023265c6fa6cc92e75bb41aa60341ff..692996c6f34b752e431207940080ac7b037cad6a 100644 (file)
--- a/setup.cfg
+++ b/setup.cfg
@@ -21,7 +21,3 @@ input_file = heat/locale/heat.pot
 keywords = _ gettext ngettext l_ lazy_gettext
 mapping_file = babel.cfg
 output_file = heat/locale/heat.pot
-
-[nosetests]
-verbosity=2
-detailed-errors=1
index 0cbb4a1e1812d2def0d3d0106c46dbb90dd4f717..14eba7c29fb3ced63ec62cec2f28723cdb206f9a 100644 (file)
@@ -4,8 +4,6 @@ distribute>=0.6.24
 coverage
 mox==0.5.3
 testrepository>=0.0.13
-nose
-openstack.nose_plugin>=0.7
 paramiko
 pep8==1.3.4
 pyflakes