Format code imports
This commit is contained in:
parent
92834aacd0
commit
a461a97576
361 changed files with 1019 additions and 754 deletions
|
|
@ -4,7 +4,7 @@ in loading global scripts where the module can be parsed but has broken
|
|||
dependencies.
|
||||
"""
|
||||
|
||||
from evennia import nonexistent_module, DefaultScript
|
||||
from evennia import DefaultScript, nonexistent_module
|
||||
|
||||
|
||||
class BrokenScript(DefaultScript):
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ Test of the ANSI parsing and ANSIStrings.
|
|||
"""
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from evennia.utils.ansi import ANSIString as AN
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,11 +1,13 @@
|
|||
"""Tests for batchprocessors """
|
||||
|
||||
import codecs
|
||||
from django.test import TestCase
|
||||
from evennia.utils import batchprocessors, utils
|
||||
import mock
|
||||
import textwrap
|
||||
|
||||
import mock
|
||||
from django.test import TestCase
|
||||
|
||||
from evennia.utils import batchprocessors, utils
|
||||
|
||||
|
||||
class TestBatchprocessorErrors(TestCase):
|
||||
@mock.patch.object(utils, "pypath_to_realpath", return_value=[])
|
||||
|
|
|
|||
|
|
@ -1,10 +1,11 @@
|
|||
import unittest
|
||||
|
||||
from evennia.utils import containers
|
||||
from django.conf import settings
|
||||
from django.test import override_settings
|
||||
from evennia.utils.utils import class_from_module
|
||||
|
||||
from evennia import DefaultScript
|
||||
from evennia.utils import containers
|
||||
from evennia.utils.utils import class_from_module
|
||||
|
||||
_BASE_TYPECLASS = class_from_module(settings.BASE_SCRIPT_TYPECLASS)
|
||||
|
||||
|
|
|
|||
|
|
@ -4,9 +4,10 @@ Tests of create functions
|
|||
"""
|
||||
|
||||
from django.test import TestCase
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
from evennia.scripts.scripts import DefaultScript
|
||||
from evennia.utils import create
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
|
||||
class TestCreateScript(BaseEvenniaTest):
|
||||
|
|
|
|||
|
|
@ -5,9 +5,10 @@ Tests for dbserialize module
|
|||
from collections import defaultdict, deque
|
||||
|
||||
from django.test import TestCase
|
||||
from parameterized import parameterized
|
||||
|
||||
from evennia.objects.objects import DefaultObject
|
||||
from evennia.utils import dbserialize
|
||||
from parameterized import parameterized
|
||||
|
||||
|
||||
class TestDbSerialize(TestCase):
|
||||
|
|
|
|||
|
|
@ -3,8 +3,8 @@ Test eveditor
|
|||
|
||||
"""
|
||||
|
||||
from evennia.utils import eveditor
|
||||
from evennia.commands.default.tests import BaseEvenniaCommandTest
|
||||
from evennia.utils import eveditor
|
||||
|
||||
|
||||
class TestEvEditor(BaseEvenniaCommandTest):
|
||||
|
|
|
|||
|
|
@ -5,6 +5,7 @@ Unit tests for the EvForm text form generator
|
|||
from unittest import skip
|
||||
|
||||
from django.test import TestCase
|
||||
|
||||
from evennia.utils import ansi, evform, evtable
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -18,13 +18,14 @@ To help debug the menu, turn on `debug_output`, which will print the traversal p
|
|||
"""
|
||||
|
||||
import copy
|
||||
|
||||
from anything import Anything
|
||||
from django.test import TestCase
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
from evennia.utils import evmenu
|
||||
from evennia.utils import ansi
|
||||
from mock import MagicMock
|
||||
|
||||
from evennia.utils import ansi, evmenu
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
|
||||
|
||||
class TestEvMenu(TestCase):
|
||||
"Run the EvMenu testing."
|
||||
|
|
|
|||
|
|
@ -10,10 +10,11 @@ from ast import literal_eval
|
|||
from unittest.mock import MagicMock, patch
|
||||
|
||||
from django.test import TestCase, override_settings
|
||||
from evennia.utils import funcparser, test_resources
|
||||
from parameterized import parameterized
|
||||
from simpleeval import simple_eval
|
||||
|
||||
from evennia.utils import funcparser, test_resources
|
||||
|
||||
|
||||
def _test_callable(*args, **kwargs):
|
||||
kwargs.pop("funcparser", None)
|
||||
|
|
|
|||
|
|
@ -2,9 +2,9 @@
|
|||
Unit tests for the utilities of the evennia.utils.gametime module.
|
||||
"""
|
||||
|
||||
from datetime import datetime
|
||||
import time
|
||||
import unittest
|
||||
from datetime import datetime
|
||||
from unittest.mock import Mock
|
||||
|
||||
from django.conf import settings
|
||||
|
|
|
|||
|
|
@ -3,10 +3,12 @@ Unit tests for all sorts of inline text-tag parsing, like ANSI, html conversion,
|
|||
|
||||
"""
|
||||
import re
|
||||
|
||||
from django.test import TestCase, override_settings
|
||||
|
||||
from evennia.utils import funcparser
|
||||
from evennia.utils.ansi import ANSIString
|
||||
from evennia.utils.text2html import TextToHTMLparser
|
||||
from evennia.utils import funcparser
|
||||
|
||||
|
||||
class ANSIStringTestCase(TestCase):
|
||||
|
|
|
|||
|
|
@ -1,9 +1,11 @@
|
|||
"""Tests for text2html """
|
||||
|
||||
import unittest
|
||||
from django.test import TestCase
|
||||
from evennia.utils import ansi, text2html
|
||||
|
||||
import mock
|
||||
from django.test import TestCase
|
||||
|
||||
from evennia.utils import ansi, text2html
|
||||
|
||||
|
||||
class TestText2Html(TestCase):
|
||||
|
|
|
|||
|
|
@ -11,11 +11,12 @@ from datetime import datetime, timedelta
|
|||
|
||||
import mock
|
||||
from django.test import TestCase
|
||||
from parameterized import parameterized
|
||||
from twisted.internet import task
|
||||
|
||||
from evennia.utils import utils
|
||||
from evennia.utils.ansi import ANSIString
|
||||
from evennia.utils.test_resources import BaseEvenniaTest
|
||||
from parameterized import parameterized
|
||||
from twisted.internet import task
|
||||
|
||||
|
||||
class TestIsIter(TestCase):
|
||||
|
|
|
|||
|
|
@ -1,10 +1,12 @@
|
|||
"""Tests for validatorfuncs """
|
||||
|
||||
from django.test import TestCase
|
||||
from evennia.utils import validatorfuncs
|
||||
import mock
|
||||
import datetime
|
||||
|
||||
import mock
|
||||
import pytz
|
||||
from django.test import TestCase
|
||||
|
||||
from evennia.utils import validatorfuncs
|
||||
|
||||
|
||||
class TestValidatorFuncs(TestCase):
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue