mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Make sure evennia is initialized even when running single app test suite.
This commit is contained in:
parent
72cb4cb618
commit
a77d56c7e1
1 changed files with 2 additions and 1 deletions
|
|
@ -30,7 +30,6 @@ except ImportError:
|
|||
import unittest
|
||||
|
||||
from django.conf import settings
|
||||
#from django.test.runner import DiscoverRunner
|
||||
from django.test.simple import DjangoTestSuiteRunner
|
||||
from evennia.utils.utils import mod_import
|
||||
|
||||
|
|
@ -45,6 +44,8 @@ class EvenniaTestSuiteRunner(DjangoTestSuiteRunner):
|
|||
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.
|
||||
"""
|
||||
import evennia
|
||||
evennia.init()
|
||||
if not test_labels:
|
||||
test_labels = [applabel.rsplit('.', 1)[1] for applabel in settings.INSTALLED_APPS
|
||||
if applabel.startswith('evennia.')]
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue