mirror of
https://github.com/LiteyukiStudio/LiteyukiBot.git
synced 2025-10-04 17:36:23 +00:00
🚀 v7
This commit is contained in:
@@ -1,21 +0,0 @@
|
||||
# -*- coding: utf-8 -*-
|
||||
"""
|
||||
Copyright (C) 2020-2025 LiteyukiStudio. All Rights Reserved
|
||||
|
||||
@Time : 2024/8/11 下午11:07
|
||||
@Author : snowykami
|
||||
@Email : snowykami@outlook.com
|
||||
@File : test_config_load.py
|
||||
@Software: PyCharm
|
||||
"""
|
||||
import json
|
||||
import os
|
||||
import sys
|
||||
|
||||
sys.path.insert(0, os.getcwd())
|
||||
from liteyuki.config import load_config_in_default
|
||||
|
||||
|
||||
def test_default_load():
|
||||
config = load_config_in_default()
|
||||
print(json.dumps(config, indent=4, ensure_ascii=False))
|
@@ -1,5 +0,0 @@
|
||||
from liteyuki import LiteyukiBot
|
||||
|
||||
if __name__ == "__main__":
|
||||
lyb = LiteyukiBot()
|
||||
lyb.run()
|
@@ -1,22 +0,0 @@
|
||||
from liteyuki.comm import Channel as Chan
|
||||
from multiprocessing import Process
|
||||
|
||||
|
||||
def p1(chan: Chan):
|
||||
for i in range(10):
|
||||
chan.send(i)
|
||||
|
||||
|
||||
def p2(chan: Chan):
|
||||
while True:
|
||||
print(chan.recv())
|
||||
|
||||
|
||||
def test_ipc():
|
||||
chan = Chan("Name")
|
||||
|
||||
p1_proc = Process(target=p1, args=(chan,))
|
||||
p2_proc = Process(target=p2, args=(chan,))
|
||||
|
||||
p1_proc.start()
|
||||
p2_proc.start()
|
@@ -1,9 +0,0 @@
|
||||
from liteyuki import logger
|
||||
|
||||
def test_logger():
|
||||
logger.info('Hello, World!')
|
||||
logger.debug('Hello, World!')
|
||||
logger.warning('Hello, World!')
|
||||
logger.error('Hello, World!')
|
||||
logger.critical('Hello, World!')
|
||||
logger.success("Hello, World!")
|
Reference in New Issue
Block a user