Coverage for sloancone/bk_utKit.py : 0%

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
1"""
2*Unit testing tools*
3"""
4from fundamentals import utKit
6# OVERRIDES
9class utKit(utKit):
11 """
12 *Override dryx utKit*
13 """
14 # Variable Data Atrributes
16 # Override Variable Data Atrributes
17 # x-dbConfig-tmpx
20# +++++++++++++++++++ NEW CONTENT ++++++++++++++++++
23from fundamentals import utKit
25# OVERRIDES
28class utKit(utKit):
30 """
31 *Override dryx utKit*
32 """
33 # Variable Data Atrributes
35 # Override Variable Data Atrributes
36 # Initialisation
37 def __init__(
38 self,
39 moduleDirectory
40 ):
41 self.moduleDirectory = moduleDirectory
42 # x-self-arg-tmpx
44 # SETUP PATHS TO COMMON DIRECTORIES FOR TEST DATA
45 self.pathToInputDir = moduleDirectory + "/input/"
46 self.pathToOutputDir = moduleDirectory + "/output/"
48 # SETUP LOGGING
49 self.loggerConfig = """
50 version: 1
51 formatters:
52 file_style:
53 format: '* %(asctime)s - %(name)s - %(levelname)s (%(filename)s > %(funcName)s > %(lineno)d) - %(message)s '
54 datefmt: '%Y/%m/%d %H:%M:%S'
55 console_style:
56 format: '* %(asctime)s - %(levelname)s: %(filename)s:%(funcName)s:%(lineno)d > %(message)s'
57 datefmt: '%H:%M:%S'
58 html_style:
59 format: '<div id="row" class="%(levelname)s"><span class="date">%(asctime)s</span> <span class="label">file:</span><span class="filename">%(filename)s</span> <span class="label">method:</span><span class="funcName">%(funcName)s</span> <span class="label">line#:</span><span class="lineno">%(lineno)d</span> <span class="pathname">%(pathname)s</span> <div class="right"><span class="message">%(message)s</span><span class="levelname">%(levelname)s</span></div></div>'
60 datefmt: '%Y-%m-%d <span class= "time">%H:%M <span class= "seconds">%Ss</span></span>'
61 handlers:
62 console:
63 class: logging.StreamHandler
64 level: DEBUG
65 formatter: console_style
66 stream: ext://sys.stdout
67 root:
68 level: DEBUG
69 handlers: [console]"""
71 # Override Variable Data Atrributes
72 self.dbConfig = """
73 version: 1
74 db: unit_tests
75 host: localhost
76 user: utuser
77 password: utpass
78 loginPath: unittesting
79 """
81 return
84# +++++++++++++++++++ NEW CONTENT ++++++++++++++++++
87from fundamentals import utKit
89# OVERRIDES
92class utKit(utKit):
94 """
95 *Override dryx utKit*
96 """
97 # Variable Data Atrributes
99 # Override Variable Data Atrributes
100 # Initialisation
101 def __init__(
102 self,
103 moduleDirectory
104 ):
105 self.moduleDirectory = moduleDirectory
106 # x-self-arg-tmpx
108 # SETUP PATHS TO COMMON DIRECTORIES FOR TEST DATA
109 self.pathToInputDir = moduleDirectory + "/input/"
110 self.pathToOutputDir = moduleDirectory + "/output/"
112 # SETUP LOGGING
113 self.loggerConfig = """
114 version: 1
115 formatters:
116 file_style:
117 format: '* %(asctime)s - %(name)s - %(levelname)s (%(filename)s > %(funcName)s > %(lineno)d) - %(message)s '
118 datefmt: '%Y/%m/%d %H:%M:%S'
119 console_style:
120 format: '* %(asctime)s - %(levelname)s: %(filename)s:%(funcName)s:%(lineno)d > %(message)s'
121 datefmt: '%H:%M:%S'
122 html_style:
123 format: '<div id="row" class="%(levelname)s"><span class="date">%(asctime)s</span> <span class="label">file:</span><span class="filename">%(filename)s</span> <span class="label">method:</span><span class="funcName">%(funcName)s</span> <span class="label">line#:</span><span class="lineno">%(lineno)d</span> <span class="pathname">%(pathname)s</span> <div class="right"><span class="message">%(message)s</span><span class="levelname">%(levelname)s</span></div></div>'
124 datefmt: '%Y-%m-%d <span class= "time">%H:%M <span class= "seconds">%Ss</span></span>'
125 handlers:
126 console:
127 class: logging.StreamHandler
128 level: DEBUG
129 formatter: console_style
130 stream: ext://sys.stdout
131 root:
132 level: DEBUG
133 handlers: [console]"""
135 # Override Variable Data Atrributes
136 self.dbConfig = """
137 version: 1
138 db: unit_tests
139 host: localhost
140 user: utuser
141 password: utpass
142 loginPath: unittesting
143 """
145 return