# -*- coding: utf-8 -*- # @Time : 2020-06-25 15:20 # @Author : liudongyang # @FileName: tests.py # @Software: PyCharm from save_data import SaveFile, ConnectMysql from make_data import MakeData from Common import CommonFunction from faker import Faker makedata = MakeData() commonfunction = CommonFunction() def test_str(data): for elem in data: if elem is None: raise ValueError("elem type is not allow None") def test_make_relation_data(): datas = makedata.make_stan_relation() test_str(datas) print(datas) def test_common_org_name(): org_name = commonfunction.org_name() print(org_name, type(org_name)) # test_common_org_name()
# -*- coding: utf-8 -*- # @Time : 2020-06-24 22:14 # @Author : liudongyang # @FileName: run.py # @Software: PyCharm # 启动文件 from parm import datannum, zip_floder from schedule import main import os import zipfile import time import datetime from Common import CommonFunction comm = CommonFunction() current_path = os.getcwd() def get_parm(): with open(os.path.join(current_path, 'parm.txt'), 'r', encoding='utf-8') as f: res = f.read() parm = res.split(',') n = int(parm[0]) t = int(parm[1]) return n, t def updtae_parm(n, pt):
def before_all(context): context.DeviceSetting = CommonFunction.InitialDeviceSetting( "Configuration/Config.ini") print("before_all")