Skip to content

Commit

Permalink
Replaced modules with wildcards
Browse files Browse the repository at this point in the history
  • Loading branch information
nuuuwan committed Apr 4, 2024
1 parent cad7706 commit 795d216
Show file tree
Hide file tree
Showing 2 changed files with 33 additions and 14 deletions.
18 changes: 8 additions & 10 deletions src/utils/__init__.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,9 @@
# no-auto

from utils_ai import AI
from utils_base import (COLOR_BACKGROUND, COLOR_FOREGROUND, COLOR_FORMAT, TimeZoneOffset, Console, CSVFile,
Dict, Directory, File, FiledVariable, Image, JSONFile,
LatLng, LatLngLK, List, Log, PDFFile, String, Time,
TimeDelta, TimeFormat, TimeUnit, TSVFile, XSVFile, Zip,
_, Hash, Parallel, XMLElement, XMLUtils)
from utils_git import Git
from utils_lang import TTS, Language, Translator
from utils_twitter import Tweet, Twitter
from utils_www import WWW
from utils_ai import *
from utils_base import *
from utils_base import _
from utils_git import *
from utils_lang import *
from utils_twitter import *
from utils_www import *
29 changes: 25 additions & 4 deletions tests/test_init.py
Original file line number Diff line number Diff line change
@@ -1,13 +1,34 @@
import unittest

from utils import (AI, TTS, WWW, Console, Git, Image, LatLng, Translator,
Tweet, _, Log, Hash, Parallel, XMLElement)
from utils import (AI, TTS, WWW, Console, Git, Hash, Image, LatLng, Log,
Parallel, Translator, Tweet, XMLElement, _)


class TestCase(unittest.TestCase):
def test_init(self):
for x in [
AI, TTS, WWW, Console, Git, Image, LatLng, Translator,
Tweet, _, Log, Hash, Parallel, XMLElement
AI,
TTS,
WWW,
Console,
Git,
Image,
LatLng,
Translator,
Tweet,
Log,
Hash,
Parallel,
XMLElement,
_,
]:
self.assertIsNotNone(x)

def test_init_custom(self):
from utils import TimeFormat

print(TimeFormat.TIME.formatNow)


if __name__ == '__main__':
unittest.main()

0 comments on commit 795d216

Please sign in to comment.