from __future__ import print_function from builtins import zip from builtins import str import os import unittest import shutil import yaml from HMpTy.utKit import utKit from fundamentals import tools from os.path import expanduser from past.utils import old_div home = expanduser("~") packageDirectory = utKit("").get_project_root() settingsFile = packageDirectory + "/test_settings.yaml" su = tools(arguments={"settingsFile": settingsFile}, docString=__doc__, logLevel="DEBUG", options_first=False, projectName=None, defaultSettingsFile=False) arguments, settings, log, dbConn = su.setup() # SETUP PATHS TO COMMON DIRECTORIES FOR TEST DATA moduleDirectory = os.path.dirname(__file__) pathToInputDir = moduleDirectory + "/input/" pathToOutputDir = moduleDirectory + "/output/" try: shutil.rmtree(pathToOutputDir)
docString=__doc__, logLevel="DEBUG", options_first=False, projectName="HMpTy" ) arguments, settings, log, dbConn = su.setup() # # load settings # stream = file( # "/Users/Dave/.config/HMpTy/HMpTy.yaml", 'r') # settings = yaml.load(stream) # stream.close() # SETUP AND TEARDOWN FIXTURE FUNCTIONS FOR THE ENTIRE MODULE moduleDirectory = os.path.dirname(__file__) utKit = utKit(moduleDirectory) log, dbConn, pathToInputDir, pathToOutputDir = utKit.setupModule() utKit.tearDownModule() # load settings stream = file( pathToInputDir + "/example_settings.yaml", 'r') settings = yaml.load(stream) stream.close() import shutil try: shutil.rmtree(pathToOutputDir) except: pass
import nose import shutil import yaml from HMpTy.utKit import utKit from fundamentals import tools # # load settings # stream = file( # "/Users/Dave/.config/HMpTy/HMpTy.yaml", 'r') # settings = yaml.load(stream) # stream.close() # SETUP AND TEARDOWN FIXTURE FUNCTIONS FOR THE ENTIRE MODULE moduleDirectory = os.path.dirname(__file__) utKit = utKit(moduleDirectory) log, dbConn, pathToInputDir, pathToOutputDir = utKit.setupModule() utKit.tearDownModule() # load settings stream = file(pathToInputDir + "/example_settings.yaml", 'r') settings = yaml.load(stream) stream.close() su = tools( arguments={"settingsFile": pathToInputDir + "/example_settings.yaml"}, docString=__doc__, logLevel="DEBUG", options_first=False, projectName="HMpTy") arguments, settings, log, dbConn = su.setup()