mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
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.key == 'test_script'
|
||||
|
||||
# @unittest.expectedFailure
|
||||
@unittest.expectedFailure
|
||||
def test_create_script_w_one_repeat(self):
|
||||
class TestScriptB(DefaultScript):
|
||||
def at_script_creation(self):
|
||||
|
|
@ -100,9 +100,8 @@ class TestCreateScript(EvenniaTest):
|
|||
self.repeats = 1
|
||||
self.persistent = False
|
||||
|
||||
with self.assertRaises(TypeError):
|
||||
script = create.create_script(TestScriptB, key='test_script')
|
||||
# assert script is not None
|
||||
# assert script.interval == 10
|
||||
# assert script.repeats == 1
|
||||
# assert script.key == 'test_script'
|
||||
script = create.create_script(TestScriptB, key='test_script')
|
||||
assert script is not None
|
||||
assert script.interval == 10
|
||||
assert script.repeats == 1
|
||||
assert script.key == 'test_script'
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue