mirror of
https://salsa.debian.org/freeipa-team/freeipa.git
synced 2025-02-25 18:55:28 -06:00
Replace some test case adjectives
Signed-off-by: Rob Crittenden <rcritten@redhat.com> Reviewed-By: Christian Heimes <cheimes@redhat.com>
This commit is contained in:
committed by
Christian Heimes
parent
f90e137a17
commit
57fd79ffce
@@ -41,10 +41,10 @@ class test_textui(ClassChecker):
|
|||||||
assert str(e) == 'rows: need %r or %r; got %r' % (list, tuple, 'hello')
|
assert str(e) == 'rows: need %r or %r; got %r' % (list, tuple, 'hello')
|
||||||
rows = [
|
rows = [
|
||||||
'hello',
|
'hello',
|
||||||
'naughty',
|
'empathetic',
|
||||||
'nurse',
|
'nurse',
|
||||||
]
|
]
|
||||||
assert o.max_col_width(rows) == len('naughty')
|
assert o.max_col_width(rows) == len('empathetic')
|
||||||
rows = (
|
rows = (
|
||||||
( 'a', 'bbb', 'ccccc'),
|
( 'a', 'bbb', 'ccccc'),
|
||||||
('aa', 'bbbb', 'cccccc'),
|
('aa', 'bbbb', 'cccccc'),
|
||||||
|
|||||||
@@ -1156,10 +1156,10 @@ class test_StrEnum(EnumChecker):
|
|||||||
_cls = parameters.StrEnum
|
_cls = parameters.StrEnum
|
||||||
_name = 'my_strenum'
|
_name = 'my_strenum'
|
||||||
_datatype = unicode
|
_datatype = unicode
|
||||||
_test_values = u'Hello', u'naughty', u'nurse!'
|
_test_values = u'Hello', u'tall', u'nurse!'
|
||||||
_bad_type_values = u'Hello', 1, u'nurse!'
|
_bad_type_values = u'Hello', 1, u'nurse!'
|
||||||
_bad_type = int
|
_bad_type = int
|
||||||
_translation = u"values='Hello', 'naughty', 'nurse!'"
|
_translation = u"values='Hello', 'tall', 'nurse!'"
|
||||||
_bad_values = u'Howdy', u'quiet', u'library!'
|
_bad_values = u'Howdy', u'quiet', u'library!'
|
||||||
_single_value_translation = u"value='Hello'"
|
_single_value_translation = u"value='Hello'"
|
||||||
|
|
||||||
|
|||||||
@@ -199,7 +199,7 @@ class test_Gettext(object):
|
|||||||
|
|
||||||
def test_mod(self):
|
def test_mod(self):
|
||||||
inst = self.klass('hello %(adj)s nurse', 'foo', 'bar')
|
inst = self.klass('hello %(adj)s nurse', 'foo', 'bar')
|
||||||
assert inst % dict(adj='naughty', stuff='junk') == 'hello naughty nurse'
|
assert inst % dict(adj='tall', stuff='junk') == 'hello tall nurse'
|
||||||
|
|
||||||
def test_eq(self):
|
def test_eq(self):
|
||||||
inst1 = self.klass('what up?', 'foo', 'bar')
|
inst1 = self.klass('what up?', 'foo', 'bar')
|
||||||
|
|||||||
@@ -195,12 +195,12 @@ def test_assert_deepequal():
|
|||||||
# Test with good compound values:
|
# Test with good compound values:
|
||||||
a = [
|
a = [
|
||||||
u'hello',
|
u'hello',
|
||||||
dict(naughty=u'nurse'),
|
dict(profession=u'nurse'),
|
||||||
18,
|
18,
|
||||||
]
|
]
|
||||||
b = [
|
b = [
|
||||||
u'hello',
|
u'hello',
|
||||||
dict(naughty=u'nurse'),
|
dict(profession=u'nurse'),
|
||||||
18,
|
18,
|
||||||
]
|
]
|
||||||
f(a, b)
|
f(a, b)
|
||||||
@@ -208,7 +208,7 @@ def test_assert_deepequal():
|
|||||||
# Test with bad compound values:
|
# Test with bad compound values:
|
||||||
b = [
|
b = [
|
||||||
b'hello',
|
b'hello',
|
||||||
dict(naughty=u'nurse'),
|
dict(profession=u'nurse'),
|
||||||
18,
|
18,
|
||||||
]
|
]
|
||||||
e = raises(AssertionError, f, a, b, 'foo')
|
e = raises(AssertionError, f, a, b, 'foo')
|
||||||
@@ -218,17 +218,17 @@ def test_assert_deepequal():
|
|||||||
|
|
||||||
b = [
|
b = [
|
||||||
u'hello',
|
u'hello',
|
||||||
dict(naughty=b'nurse'),
|
dict(profession=b'nurse'),
|
||||||
18,
|
18,
|
||||||
]
|
]
|
||||||
e = raises(AssertionError, f, a, b, 'foo')
|
e = raises(AssertionError, f, a, b, 'foo')
|
||||||
assert str(e) == TYPE % (
|
assert str(e) == TYPE % (
|
||||||
'foo', unicode, bytes, u'nurse', b'nurse', (1, 'naughty')
|
'foo', unicode, bytes, u'nurse', b'nurse', (1, 'profession')
|
||||||
)
|
)
|
||||||
|
|
||||||
b = [
|
b = [
|
||||||
u'hello',
|
u'hello',
|
||||||
dict(naughty=u'nurse'),
|
dict(profession=u'nurse'),
|
||||||
18.0,
|
18.0,
|
||||||
]
|
]
|
||||||
e = raises(AssertionError, f, a, b, 'foo')
|
e = raises(AssertionError, f, a, b, 'foo')
|
||||||
@@ -239,7 +239,7 @@ def test_assert_deepequal():
|
|||||||
# List length mismatch
|
# List length mismatch
|
||||||
b = [
|
b = [
|
||||||
u'hello',
|
u'hello',
|
||||||
dict(naughty=u'nurse'),
|
dict(profession=u'nurse'),
|
||||||
18,
|
18,
|
||||||
19
|
19
|
||||||
]
|
]
|
||||||
@@ -249,7 +249,7 @@ def test_assert_deepequal():
|
|||||||
)
|
)
|
||||||
|
|
||||||
b = [
|
b = [
|
||||||
dict(naughty=u'nurse'),
|
dict(profession=u'nurse'),
|
||||||
18,
|
18,
|
||||||
]
|
]
|
||||||
e = raises(AssertionError, f, a, b, 'foo')
|
e = raises(AssertionError, f, a, b, 'foo')
|
||||||
@@ -266,36 +266,39 @@ def test_assert_deepequal():
|
|||||||
18,
|
18,
|
||||||
]
|
]
|
||||||
e = raises(AssertionError, f, a, b, 'foo')
|
e = raises(AssertionError, f, a, b, 'foo')
|
||||||
assert str(e) == KEYS % ('foo',
|
assert str(e) == KEYS % (
|
||||||
['naughty'], [],
|
'foo',
|
||||||
exp_str(dict(naughty=u'nurse')), got_str(dict()),
|
['profession'], [],
|
||||||
|
exp_str(dict(profession=u'nurse')), got_str(dict()),
|
||||||
(1,)
|
(1,)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Extra
|
# Extra
|
||||||
b = [
|
b = [
|
||||||
u'hello',
|
u'hello',
|
||||||
dict(naughty=u'nurse', barely=u'legal'),
|
dict(profession=u'nurse', status=u'RN'),
|
||||||
18,
|
18,
|
||||||
]
|
]
|
||||||
e = raises(AssertionError, f, a, b, 'foo')
|
e = raises(AssertionError, f, a, b, 'foo')
|
||||||
assert str(e) == KEYS % ('foo',
|
assert str(e) == KEYS % (
|
||||||
[], ['barely'],
|
'foo',
|
||||||
exp_str(dict(naughty=u'nurse')),
|
[], ['status'],
|
||||||
got_str(dict(naughty=u'nurse', barely=u'legal')),
|
exp_str(dict(profession=u'nurse')),
|
||||||
|
got_str(dict(profession=u'nurse', status=u'RN')),
|
||||||
(1,)
|
(1,)
|
||||||
)
|
)
|
||||||
|
|
||||||
# Missing + Extra
|
# Missing + Extra
|
||||||
b = [
|
b = [
|
||||||
u'hello',
|
u'hello',
|
||||||
dict(barely=u'legal'),
|
dict(status=u'RN'),
|
||||||
18,
|
18,
|
||||||
]
|
]
|
||||||
e = raises(AssertionError, f, a, b, 'foo')
|
e = raises(AssertionError, f, a, b, 'foo')
|
||||||
assert str(e) == KEYS % ('foo',
|
assert str(e) == KEYS % (
|
||||||
['naughty'], ['barely'],
|
'foo',
|
||||||
exp_str(dict(naughty=u'nurse')), got_str(dict(barely=u'legal')),
|
['profession'], ['status'],
|
||||||
|
exp_str(dict(profession=u'nurse')), got_str(dict(status=u'RN')),
|
||||||
(1,)
|
(1,)
|
||||||
)
|
)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user