mirror of
https://github.com/evennia/evennia.git
synced 2026-03-19 22:36:31 +01:00
This change meant several changes to the lock and permission functionality, since it becomes important if permissions are assigned on the Player or on their Character (lock functions pperm() and pid() etc check on Player rather than Character). This has the boon of allowing Admins to switch and play/test the game as a "Low access" character as they like. Plenty of bug fixes and adjustments. Migrations should make sure to move over all data properly.
24 lines
952 B
Python
24 lines
952 B
Python
"""
|
|
Test runner for Evennia test suite. Run with "game/manage.py test".
|
|
|
|
"""
|
|
|
|
from django.conf import settings
|
|
from django.test.simple import DjangoTestSuiteRunner
|
|
|
|
class EvenniaTestSuiteRunner(DjangoTestSuiteRunner):
|
|
"""
|
|
This test runner only runs tests on the apps specified in src/ and game/ to
|
|
avoid running the large number of tests defined by Django
|
|
"""
|
|
def build_suite(self, test_labels, extra_tests=None, **kwargs):
|
|
"""
|
|
Build a test suite for Evennia. test_labels is a list of apps to test.
|
|
If not given, a subset of settings.INSTALLED_APPS will be used.
|
|
"""
|
|
if not test_labels:
|
|
test_labels = [applabel.rsplit('.', 1)[1] for applabel in settings.INSTALLED_APPS
|
|
if (applabel.startswith('src.') or applabel.startswith('game.'))]
|
|
return super(EvenniaTestSuiteRunner, self).build_suite(test_labels, extra_tests=extra_tests, **kwargs)
|
|
|
|
|