запуск с одной директории
This commit is contained in:
39
pytest.py
39
pytest.py
@ -1,55 +1,36 @@
|
||||
#!/usr/bin/env python3
|
||||
from colorama import Fore, Style
|
||||
import os
|
||||
import unittest
|
||||
|
||||
import time
|
||||
from threading import Thread
|
||||
from pathlib import Path
|
||||
|
||||
|
||||
|
||||
def zero(x=""):
|
||||
return 0
|
||||
input = zero
|
||||
import hlna
|
||||
home_dir = Path.home()
|
||||
config_hlna = f"{home_dir}/.config/hlna/"
|
||||
|
||||
"---------------import подменяем через unittest.mock -----------------------"
|
||||
|
||||
"---------------------------------------------------------------------------"
|
||||
|
||||
def config():
|
||||
hlna.config()
|
||||
def servers():
|
||||
x = input()
|
||||
print('x=',x)
|
||||
x = os.system("./hlna.py servers")
|
||||
x = os.system("./hlna.py servers >> /dev/null")
|
||||
if x == 0:
|
||||
print("Servers - "+Fore.GREEN + "OK" + Style.RESET_ALL)
|
||||
else:
|
||||
print(Fore.RED + "Servers Fail" + Style.RESET_ALL)
|
||||
def delete():
|
||||
print("Delete - " + Fore.RED + "False" + Style.RESET_ALL)
|
||||
class TestHlna(unittest.TestCase):
|
||||
def setUp(self):
|
||||
self.p1
|
||||
def test_config(self):
|
||||
pass
|
||||
# self.assert _input(hlna.config(input(1), 11))
|
||||
def test_servers(self):
|
||||
pass
|
||||
def test_enablemap(self):
|
||||
passs
|
||||
def test_start(self):
|
||||
pass
|
||||
def test_delete(self):
|
||||
pass
|
||||
def test_rcon(self):
|
||||
pass
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
#unittest.main()
|
||||
#servers()
|
||||
config()
|
||||
|
||||
servers()
|
||||
delete()
|
||||
config()
|
||||
|
||||
|
||||
|
||||
#print(f"{Fore.GREEN} + {text}")
|
||||
|
Reference in New Issue
Block a user