mirror of
https://github.com/evennia/evennia.git
synced 2026-03-31 21:17:17 +02:00
Set turn handler's intervals higher during tests
This was an attempt to try to fix some strange 'unhandled error in deffered' results while unit testing the contrib folder. It didn't work, but it's probably good to do anyway.
This commit is contained in:
parent
9bc3fcf486
commit
df9072253f
1 changed files with 6 additions and 0 deletions
|
|
@ -993,6 +993,8 @@ class TestTurnBattleFunc(EvenniaTest):
|
|||
attacker.location.scripts.add(tb_basic.TBBasicTurnHandler)
|
||||
turnhandler = attacker.db.combat_TurnHandler
|
||||
self.assertTrue(attacker.db.combat_TurnHandler)
|
||||
# Set the turn handler's interval very high to keep it from repeating during tests.
|
||||
turnhandler.interval = 10000
|
||||
# Force turn order
|
||||
turnhandler.db.fighters = [attacker, defender]
|
||||
turnhandler.db.turn = 0
|
||||
|
|
@ -1070,6 +1072,8 @@ class TestTurnBattleFunc(EvenniaTest):
|
|||
attacker.location.scripts.add(tb_equip.TBEquipTurnHandler)
|
||||
turnhandler = attacker.db.combat_TurnHandler
|
||||
self.assertTrue(attacker.db.combat_TurnHandler)
|
||||
# Set the turn handler's interval very high to keep it from repeating during tests.
|
||||
turnhandler.interval = 10000
|
||||
# Force turn order
|
||||
turnhandler.db.fighters = [attacker, defender]
|
||||
turnhandler.db.turn = 0
|
||||
|
|
@ -1145,6 +1149,8 @@ class TestTurnBattleFunc(EvenniaTest):
|
|||
attacker.location.scripts.add(tb_range.TBRangeTurnHandler)
|
||||
turnhandler = attacker.db.combat_TurnHandler
|
||||
self.assertTrue(attacker.db.combat_TurnHandler)
|
||||
# Set the turn handler's interval very high to keep it from repeating during tests.
|
||||
turnhandler.interval = 10000
|
||||
# Force turn order
|
||||
turnhandler.db.fighters = [attacker, defender]
|
||||
turnhandler.db.turn = 0
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue