Remove all references to nose

Now that testtools and testr have replaced nose, trims all references
and removes nose from test-requires.

Change-Id: I0aae8fe2c09c5b25741226555838dc330d5c4d91
This commit is contained in:
Clint Byrum 2013-05-01 10:33:30 -07:00
parent a9557085c8
commit 5ae3de07b9
5 changed files with 3 additions and 41 deletions

View 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):

View 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__

View File

@ -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))

View File

@ -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

View 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