Implemented a unit testing framework for Evennia. Unfortunately it seems it is only usable in latest Django SVN, due to a Django bug; Run "manage.py test-evennia" - if you get errors about SUPPORTS_TRANSACTIONS, you are affected by the bug. Since this is only likely to affect evennia devs at this point I added a few base tests in src/objects/tests.py as a template for those willing to help add unit tests.

This commit is contained in:
Griatch 2010-11-21 19:02:24 +00:00
parent a7899e0119
commit 502ebff1a2
7 changed files with 227 additions and 15 deletions

View file

@ -133,7 +133,8 @@ def cemit_info(message):
infochan = Channel.objects.get_channel(infochan[0])
except Exception:
return
cname = infochan.key
cmessage = "\n".join(["[%s]: %s" % (cname, line) for line in message.split('\n')])
infochan.msg(cmessage)
if infochan:
cname = infochan.key
cmessage = "\n".join(["[%s]: %s" % (cname, line) for line in message.split('\n')])
infochan.msg(cmessage)