Coverage for HMpTy/tests/test_cl_utils.py : 90%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1from __future__ import print_function
2from builtins import str
3import os
4import unittest
5import shutil
6import yaml
7from HMpTy.utKit import utKit
8from fundamentals import tools
9from os.path import expanduser
10from docopt import docopt
11from HMpTy import cl_utils
12doc = cl_utils.__doc__
13home = expanduser("~")
15packageDirectory = utKit("").get_project_root()
16settingsFile = packageDirectory + "/test_settings.yaml"
18su = tools(
19 arguments={"settingsFile": settingsFile},
20 docString=__doc__,
21 logLevel="DEBUG",
22 options_first=False,
23 projectName=None,
24 defaultSettingsFile=False
25)
26arguments, settings, log, dbConn = su.setup()
28# SETUP PATHS TO COMMON DIRECTORIES FOR TEST DATA
29moduleDirectory = os.path.dirname(__file__)
30pathToInputDir = moduleDirectory + "/input/"
31pathToOutputDir = moduleDirectory + "/output/"
33try:
34 shutil.rmtree(pathToOutputDir)
35except:
36 pass
37# COPY INPUT TO OUTPUT DIR
38shutil.copytree(pathToInputDir, pathToOutputDir)
40# Recursively create missing directories
41if not os.path.exists(pathToOutputDir):
42 os.makedirs(pathToOutputDir)
45class test_cl_utils(unittest.TestCase):
47 def test_init(self):
48 # TEST CL-OPTIONS
49 # command = "hmpty init"
50 # args = docopt(doc, command.split(" ")[1:])
51 # cl_utils.main(args)
52 return
54 # x-class-to-test-named-worker-function