Use unittest.expectFailure decoration
This commit is contained in:
parent
b510bc12f4
commit
9871aa6156
1 changed files with 6 additions and 7 deletions
|
|
@ -91,7 +91,7 @@ class TestCreateScript(EvenniaTest):
|
||||||
assert script.interval == 10
|
assert script.interval == 10
|
||||||
assert script.key == 'test_script'
|
assert script.key == 'test_script'
|
||||||
|
|
||||||
# @unittest.expectedFailure
|
@unittest.expectedFailure
|
||||||
def test_create_script_w_one_repeat(self):
|
def test_create_script_w_one_repeat(self):
|
||||||
class TestScriptB(DefaultScript):
|
class TestScriptB(DefaultScript):
|
||||||
def at_script_creation(self):
|
def at_script_creation(self):
|
||||||
|
|
@ -100,9 +100,8 @@ class TestCreateScript(EvenniaTest):
|
||||||
self.repeats = 1
|
self.repeats = 1
|
||||||
self.persistent = False
|
self.persistent = False
|
||||||
|
|
||||||
with self.assertRaises(TypeError):
|
|
||||||
script = create.create_script(TestScriptB, key='test_script')
|
script = create.create_script(TestScriptB, key='test_script')
|
||||||
# assert script is not None
|
assert script is not None
|
||||||
# assert script.interval == 10
|
assert script.interval == 10
|
||||||
# assert script.repeats == 1
|
assert script.repeats == 1
|
||||||
# assert script.key == 'test_script'
|
assert script.key == 'test_script'
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue