-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtest.py
executable file
·41 lines (33 loc) · 1.13 KB
/
test.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
import unittest
import os, sys
from pprint import pprint
# import components
from lib import calc
class corrNetworkTests(unittest.TestCase):
'''
Battery tests
'''
def setUp(self):
self.indir = os.path.dirname( __file__ ) +'/tests'
self.fname = 'test2'
self.infile = self.indir +'/'+ self.fname +'-in.xlsx'
self.widget = calc.calculate(self.infile)
def testCorrelationPearson(self):
method = 'pearson'
self.widget.correlation(method)
outfile = self.indir +'/'+self.fname+'-out_'+method+'.csv'
self.widget.to_csv(outfile)
def testCorrelationKendall(self):
method = 'kendall'
self.widget.correlation(method)
outfile = self.indir +'/'+self.fname+'-out_'+method+'.csv'
self.widget.to_csv(outfile)
def testCorrelationSpearman(self):
method = 'spearman'
self.widget.correlation(method)
outfile = self.indir +'/'+self.fname+'-out_'+method+'.csv'
self.widget.to_csv(outfile)
def main():
unittest.main()
if __name__ == '__main__':
main()