From df9072253f9a99986689e397b66dcee90c0b2b6e Mon Sep 17 00:00:00 2001 From: FlutterSprite Date: Sun, 29 Oct 2017 23:00:22 -0700 Subject: [PATCH] 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. --- evennia/contrib/tests.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/evennia/contrib/tests.py b/evennia/contrib/tests.py index 4b2c1a696f..79a61ce65d 100644 --- a/evennia/contrib/tests.py +++ b/evennia/contrib/tests.py @@ -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