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:
parent
a9557085c8
commit
5ae3de07b9
@ -13,7 +13,6 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
import mox
|
import mox
|
||||||
from nose.plugins.attrib import attr
|
|
||||||
|
|
||||||
import eventlet
|
import eventlet
|
||||||
|
|
||||||
@ -33,8 +32,6 @@ class DummyTask(object):
|
|||||||
print self, step_num
|
print self, step_num
|
||||||
|
|
||||||
|
|
||||||
@attr(tag=['unit', 'scheduler'])
|
|
||||||
@attr(speed='fast')
|
|
||||||
class TaskTest(mox.MoxTestBase):
|
class TaskTest(mox.MoxTestBase):
|
||||||
|
|
||||||
def test_run(self):
|
def test_run(self):
|
||||||
|
@ -13,7 +13,8 @@
|
|||||||
# under the License.
|
# under the License.
|
||||||
|
|
||||||
|
|
||||||
import nose.plugins.skip as skip
|
from testtools import skipIf
|
||||||
|
|
||||||
from heat.db.sqlalchemy.session import get_engine
|
from heat.db.sqlalchemy.session import get_engine
|
||||||
from heat.db import migration
|
from heat.db import migration
|
||||||
|
|
||||||
@ -27,8 +28,7 @@ class skip_if(object):
|
|||||||
def __call__(self, func):
|
def __call__(self, func):
|
||||||
def _skipper(*args, **kw):
|
def _skipper(*args, **kw):
|
||||||
"""Wrapped skipper function."""
|
"""Wrapped skipper function."""
|
||||||
if self.condition:
|
skipIf(self.condition, self.message)
|
||||||
raise skip.SkipTest(self.message)
|
|
||||||
func(*args, **kw)
|
func(*args, **kw)
|
||||||
_skipper.__name__ = func.__name__
|
_skipper.__name__ = func.__name__
|
||||||
_skipper.__doc__ = func.__doc__
|
_skipper.__doc__ = func.__doc__
|
||||||
|
@ -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))
|
|
@ -21,7 +21,3 @@ input_file = heat/locale/heat.pot
|
|||||||
keywords = _ gettext ngettext l_ lazy_gettext
|
keywords = _ gettext ngettext l_ lazy_gettext
|
||||||
mapping_file = babel.cfg
|
mapping_file = babel.cfg
|
||||||
output_file = heat/locale/heat.pot
|
output_file = heat/locale/heat.pot
|
||||||
|
|
||||||
[nosetests]
|
|
||||||
verbosity=2
|
|
||||||
detailed-errors=1
|
|
||||||
|
@ -4,8 +4,6 @@ distribute>=0.6.24
|
|||||||
coverage
|
coverage
|
||||||
mox==0.5.3
|
mox==0.5.3
|
||||||
testrepository>=0.0.13
|
testrepository>=0.0.13
|
||||||
nose
|
|
||||||
openstack.nose_plugin>=0.7
|
|
||||||
paramiko
|
paramiko
|
||||||
pep8==1.3.4
|
pep8==1.3.4
|
||||||
pyflakes
|
pyflakes
|
||||||
|
Loading…
Reference in New Issue
Block a user